On Dec 7, 2007 6:27 AM, Victor Nazarov <[EMAIL PROTECTED]> wrote: > Cool solution and not so complicated and ad-hoc. But I'd like to ask > isn't the following definition is more natural and simple? > > nary 0 x [] = x > nary n f (x:xs) | n > 0 = nary (n-1) (f $ read x) xs
Sometimes it helps to write type signatures for functions. As in this case, where you'll find you won't be able to... :-) Luke _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe