2005-10-08から1日間の記事一覧

Partial applicationその4

部分適用は演算子にも使えたんですね。 using System; def lst = [2, 3, 4]; // 匿名関数 Console.WriteLine (lst.FoldRight (1, fun (x, y) { x + y })); Console.WriteLine (lst.FoldRight (1, fun (x, y) { x * y })); // 部分適用で同等の内容 Console.W…