public void LambdaLifting(ITreeNode node, CachedValue <string> cachedValue) { var str0 = cachedValue.GetOrCreate(node, 4222, (_, __) => _.ToString()); var str1 = cachedValue.GetOrCreate(node, _ => _.ToString()); var str2 = cachedValue.GetOrCreate(node, _ => node.ToString()); var str3 = cachedValue.GetOrCreate(() => node.ToString()); }
public void LambdaLifting(ITreeNode node, CachedValue cachedValue) { // no var str1 = cachedValue.GetOrCreate(() => node.ToString()); var str2 = cachedValue.GetOrCreate2(() => node.ToString()); // yes var str3 = cachedValue.GetOrCreate3(() => node.ToString()); var str4 = cachedValue.GetOrCreate4(() => node.ToString()); }