3 ms·
fun. https://gist.github.com/pipermerriam/d1b5a24230f2f9ec4446 https://gist.github.com/pipermerriam/d1b5a24230f2f9ec4446
by pipermerriam 11y ago
fun.
https://gist.github.com/pipermerriam/d1b5a24230f2f9ec4446 https://gist.github.com/pipermerriam/d1b5a24230f2f9ec4446
- deleted 11y ago[deleted]
- anishathalye 11y agoslightly less verbose: https://gist.github.com/1751cebe44d88dc7db15 https://gist.github.com/1751cebe44d88dc7db15
- chronial 11y agoslightly less Haskell :) https://gist.github.com/Chronial/e091dc5deb9234a2a7a1 https://gist.github.com/Chronial/e091dc5deb9234a2a7a1
- markcerqueira 11y agoBut slightly more Haskell... ;)
- tmhedberg 11y ago`zip toss toss` only produces 2 of the possible outcomes. Try `liftA2 (,) toss toss` instead.
- Veedrac 11y agoThere's always [(a, b) | a <- toss, b <- toss]. It's not as Haskell-y, but it's simpler.