0:00 / 0:00
The Not-A-Wat in Haskell
NYC Haskell User's Group
1.7K subscribers • 23 videos on Hallway
- Recommended by 1 person: 1 in engineering communities.
- Presented by Brian Hurt
- Linked in the descriptionbhurt/presentations
Intermediate. Assumes working knowledge.
4.9K views11 years ago1 recommendation
Brian Hurt delivers a lightning talk exploring Haskell counterparts to the famous Wat talk, showing surprising but logical language behaviors.
Brian Hurt gives a lightning talk that is the Haskell counterpart to the famous 2012 Wat talk. Slides: github.com/bhurt/presentations/blob/master/notawat.pdf Meetup Link: meetup.com/NY-Haskell/events/225618891/ New York Haskell Meetup, October 28, 2015Why it's here
1 person recommends thisu/po8in r/haskell • Mentions
On “How length function produces this output ?”
Well, that thing to the right of "length" may *look* like a two-tuple to you, but it's *actually* a sequence of one element with an annotation to its left. Or so the folks who decided to include two-tuples as Traversable are convinced. So when you take the length of it, you get the number of elements in that one-element sequence. Which is 1.
There's apparently a new rule in town when it comes to Haskell typing: if there's a unique instance of a given type for a given typeclass, you *must* include it in the default environment. Of course, the unique instance isn't exactly, well, unique, since the annotation could just as easily (and arguable more sensibly) have been on the *right* of the val…