Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Haskell

Name: Anonymous 2009-01-27 20:20

Please help with my Haskell code. It is supposed to return the maximum element in a list but it doesn't work

lol :: [a] -> Nothing | a
lol [] = Nothing
lol [x] = x
lol (x:xs) = if x > lol xs then x else lol xs

Name: Anonymous 2009-01-28 18:14

>>32
I've found that performance problems in Haskell were (more often than not) caused by not understanding the implications of laziness
So it's like most other languages, where performance problems are caused by similar misunderstandings of language feature? (eg. not understanding garbage collection/free/delete?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List