Posted on 28-05-2007
Filed Under (Haskell, beauty, code, uni) by Pete

I just wrote the following snippet of code for my dissertation:

intNatI :: Int :~= Nat
intNatI = Iso {
            to   = fromInteger . toInteger,
            from = fromInteger . toInteger }

The components to and from have totally different types (to is Int -> Nat, from is Nat -> Int). Yay for type inference! :)

(0) Comments    Read More   
The title of this entry (if you take "buffalo" to be 1) the obvious noun with identical plural, 2) capitalised, the proper noun referring to the American city, and 3) a verb meaning approximately "bully") is a grammatically correct sentence of English. (I first came across it in The Language Instinct by Stephen Pinker, but was reminded of it recently.) In fact, according to Wikipedia, for any n ≥ 1, buffalon is a grammatically correct sentence, if you disregard capitalisation. ("Buffalo!", "Buffalo buffalo", "Buffalo buffalo buffalo", etc.) Don't you just love natural language?
(0) Comments    Read More