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

fmap fmap fmap

Name: Anonymous 2009-02-28 16:41

Someone in #haskell used (***), and when I asked lambdabot to tell me its type, it printed out scary gobbledygook that didn't even fit on one line! Then someone used fmap fmap fmap and my brain exploded.
- from a book on haskell

I think /prog must unite its forces and remake apply into fap (Functional APplication). Really.

Name: Anonymous 2009-03-02 2:51

>>31
This is ambiguous. You could be writing anything in Lisp, or you could be writing a Lisp program in Haskell.

If the latter, note that Haskell's lists are homogenous, which means that its contents must all have exactly the same type. If you want to be able to put both a number and a string (for example) into the same list, you have to create a "wrapper" type that allows different constructors to have arguments of different types:
data ListVal = SomeString String | SomeNumber Int
So now you can have: [SomeString "GRUNNUR", SomeNumber 47] :: [ListVal]

And then you just pattern match against that, exactly like in >>28

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