31 ms·
Wow. Interesting. This is really cool, being able to learn like this :3 I must admit I have so many questions, like what the dot does, what fst and snd and >>=
by i336_ 9y ago
Wow. Interesting. This is really cool, being able to learn like this :3
I must admit I have so many questions, like what the dot does, what fst and snd and >>= and OverloadedStrings and zip do... :)
Oh, and what "snoc" means.
- codygman 9y agocons = prepend snoc = append fst = first item of tuple snd = second item of tuple >>= is monadic bind... I won't try to explain it here. It's somewhat similiar to flatmap in Scala which has some easy explanations. zip, I just remembered I explained already.
- i336_ 9y agoOoooh. Thanks. :) I definitely have no excuse, I need to go find a decent Haskell reference-tutorial-manual. Know of any good ones for people with no former experience with functional programming (and ADHD :P)? I'm aware of Learn You a Haskell, just wondered what your experiences were.
- dllthomas 9y agoOverloadedStrings is an extension that basically puts `fromString` in front of every string literal. This means that instead of having type `String`, string literals have type `IsString a => a` (meaning "for anything that implements `IsString`, this could be a that"). It's used here so that `"http:"` can be used as a `ByteString` without cluttering the code up with an explicit `fromString`.