Format:
Recent snippets matching tags of Recursion
class PowerSet { static void Main(string[] args) { var set = Enumerable.Range(0, 8); foreach (var subSet in PowerSets(set)) Console.WriteLine(String.Join(" ", subSet)); } private static IEnumerable<IEnumerable<T>> PowerSets<T>(IEnumerable<T> masterSet)
144 Views
no comments
public class Tail
{
public static Action<T> RecursiveAction<T>(Action<T> a)
{
var methodInfo = Recursive(a.Method);
Action<T> action = p =>
{
var t = methodInfo.DeclaringType;
t.InvokeMember(methodInfo.Name, BindingFlags.InvokeMethod, null, t, new object[] { p });
307 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
