[Haskell-beginners] cps in yaht

Dilawar Singh dilawars at iitb.ac.in
Sat Jul 13 13:41:56 CEST 2013

>cfold’ f z [] = z
>cfold’ f z (x:xs) = f x z (\y -> cfold’ f y xs)
>cfold (+) 0 []
>So my question comes, is it a bug in the book or something I miss here?

This can't be correct. In expression `f x z (\y ...)`, function 'f' takes three
argument but (+) can only take two. May be you are suppose to pass some other
function to cfold'.


More information about the Beginners mailing list