[Haskell-cafe] OCaml list sees abysmal Language Shootout results
ketil+haskell at ii.uib.no
Fri Oct 1 02:48:58 EDT 2004
Ketil Malde <ketil+haskell at ii.uib.no> writes:
>> wc :: !(Int,Int,Int) -> Char -> (Int, Int, Int)
> I'm not sure if that was your question
Sorry about that, brain malfunction, bangs are for data declarations,
I'll get that cup of coffee now.
I guess what you really want to do, is to put some `seq`s in there.
wc (cs,ws,ls) ... = cs `seq` ws `seq` ls `seq` ...the def. of wc...
which evaluates the Ints before doing anything else. Or use (!$)
(like function application ($), but strict).
If I haven't seen further, it is by standing in the footprints of giants
More information about the Haskell-Cafe