2008-06-27から1日間の記事一覧

Exercise 9.9

fix 関数の型はどんなものかってのと、 fix を使って remainder を再帰でない形に書き直しなさいって問題。 fix と remainder の定義はそれぞれ以下のとおり: fix f = f (fix f) remainder :: Integer -> Integer -> Integer remainder a b = if a < b then …

Currying

9.1 Curring, More About Higher-Order Functions, "Haskell School of Expression" から引用。 This method of applying functions to one argument at a time, yielding intermediate functions along the way, is called currying, after the logician Ha…