Steve Frampton <[EMAIL PROTECTED]> wrote:
> foo x = ['1'] ++ foo(x div 10)
> *** term : foo
> *** type : ((a -> a -> a) -> b -> Int) -> [Char]
> *** does not match : Int -> [Char]
> Huh? I tried all manner of things, like ((x::Int) div 10),
> ((x div 10)::Int), etc. to no avail.
"div" is a prefix operator. When you write "x div ..." the compiler
treats "x" as function which takes an argument "div".
So instead of "x div 10" you should write "div x 10" (or alternatively
"x `div` 10").
--
Tomasz Lukaszewicz o ___ | "I have no idea
mailto:[EMAIL PROTECTED] o /o \/| | what to write here."
http://www.tomasz.w.pl/english/ \___/\| | -- Me --