brool

brool \brool\ (n.) : a low roar; a deep murmur or humming

Stupid Haskell Tricks

Monday, April 13th, 2009
Let’s say that you really, really want some notion of objected oriented programming. So let’s make a class that represents a name, and some simple method calls on it: [code lang="haskell"] data S = S { name :: String } deriving (Show) firstname s = (words (name s))!!0 lastname s = (words (name s))!!1 [/code] [...]