4 ms·
Yep, I've missed apostrophe's quite a few times. It's was a common cause of infinite loops for me in the past, but I suppose I've trained myself to spot them mo
by codygman 9y ago
Yep, I've missed apostrophe's quite a few times. It's was a common cause of infinite loops for me in the past, but I suppose I've trained myself to spot them more quickly.
Perhaps zip can be more simply explained by a simple example:
out: zip ["a","b","c"] [0,1,2]
out: [("a",0),("b",1),("c",2)]
out: fmap fst [(0,1),(2,3),(4,5)]
out: [0,2,4]
out: fmap snd [(0,1),(2,3),(4,5)]
out: [1,3,5]
- i336_ 9y agoOhhhhh. zip is cool! And I wondered whether "fst" was "first" and "snd" was "second"... is there a "trd" and "fth"? Also - is [] a list (or mixed type) and () an array (or same-item type)?