Upgrade to Pro — share decks privately, control downloads, hide ads and more …

I used to be a writer (love letter to Ruby)

I used to be a writer (love letter to Ruby)

Slides for my lightning talk in the lightning.io conference. Poznan, Poland, 21-7-2012

Sergio Gil

July 21, 2012
Tweet

More Decks by Sergio Gil

Other Decks in Programming

Transcript

  1. I used to be a writer (love letter to Ruby)

    Sergio Gil (@porras) lightning.io Poznań, PL
  2. data Tree a = Empty | Node a (Tree a)

    (Tree a) size :: Tree a -> Int size Empty = 0 size (Node _ t1 t2) = 1 + size t1 + size t2 elements :: Tree a -> [a] elements Empty = [] elements (Node x t1 t2) = x : elements t1 ++ elements t2
  3. ??