6
Shouts

Call a Function to Infinity

published 1030 days, 2 hours, 22 minutes ago posted by KodefuGuruKodefuGuru 1030 days, 22 hours, 2 minutes ago
Tuesday, July 27, 2010 9:52:03 AM GMT Monday, July 26, 2010 2:11:28 PM GMT

What if the resulting value of a function was used to feed the parameter of the same function? It easy enough to call a function, get its result, then pass it back in. However, I wanted to abstract this and make it work for anything whose generic parameter type is the same as the generic result type. If it’s abstracted, there must be some arbitrary end point… right? How about infinity?

category: Agile | clicked: 1 | | source: www.kodefuguru.com | show counter code
tags: C#, Func, extension method, Recursion