X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=rosetta1.mdwn;h=0a09c7c9f7771fed33da50c62f5371fb8e578d84;hp=32e41023c470c521f9cfe07fc4ecaafc96db16f7;hb=020566910974049e4cd9cbc9279a781768e1817c;hpb=c85a4a315e5722e56bca71b3eaf8f9f59aee220e diff --git a/rosetta1.mdwn b/rosetta1.mdwn index 32e41023..0a09c7c9 100644 --- a/rosetta1.mdwn +++ b/rosetta1.mdwn @@ -167,7 +167,7 @@ Here are some interesting functions we can define in Kapulet. See [[below|rosett curried_flip match lambda g. lambda y x. g x y; in ... -The function `curry` takes as an argument a function `f` that expects its arguments *uncurried*, and returns instead a function `lambda x y. f (x, y)` a function that expects its arguments *curried* --- but then does with them whatever `f` does. Going in the other direction, the function `uncurry` takes a function `g` that expects its arguments *curried*, and returns instead a function that expects its arguments *uncurried* --- but then does with them whatever `g` does. +The function `curry` takes as an argument a function `f` that expects its arguments *uncurried*, and returns instead `lambda x y. f (x, y)`, a function that expects its arguments *curried* --- but then does with them whatever `f` does. Going in the other direction, the function `uncurry` takes a function `g` that expects its arguments *curried*, and returns instead a function that expects its arguments *uncurried* --- but then does with them whatever `g` does. The function `uncurried_flip` takes as an argument again an uncurried function `f`, and returns another function that also expects its arguments uncurried, but that expects them in the other order. `curried_flip` transforms a curried function `g` in the analogous way. These are both different from the function `swap` we defined in the [[course notes|topics/week1_kapulet_advanced#functions]] as: