Attempt at a Haskell Clone (with extraction)