平々毎々(アーカイブ)

はてなダイアリーのアーカイブです。

2008-04-09から1日間の記事一覧

unfold

(unfold p f g seed tail-gen) == (if (p seed) (tail-gen seed) (cons (f seed) (unfold p f g (g seed)))) public static IEnumerable<U> Unfold<T, U>(Predicate<T> p, Func<T, U> f, Func<T, T> g, T seed) { if (p(seed)) return Enumerable.Empty<U>(); return Cons(f(seed), Unfo</u></t,></t,></t></t,></u>…