Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Functional Semantics in Imperative Clothing (Richard Feldman). Parent comment
Yes, although it's slightly clumsy.
example = do let suits = ["♠", "♥", "♦", "♣"] let nums = concat [["A"], map show [2..10], ["J","Q","K"]] let cards = do pure (!nums ++ !suits) putStrLn (unwords (take 15 cards)) ghci> example A♠ A♥ A♦ A♣ 2♠ 2♥ 2♦ 2♣ 3♠ 3♥ 3♦ 3♣ 4♠ 4♥ 4♦
There are no comments on this comment yet.
Yes, although it's slightly clumsy.