Name: Anonymous 2009-01-01 14:40
Does anyone use Haskell Clean?
Its faster then GHC
Its faster then GHC
data Tree a = Node a [Tree a]
deriving Show
-- | Same as
-- letrec x = Node 1 [Node 2 [], Node 3 [x,y]]
-- y = Node 2 [x]
-- in Node 1 [y]
cyclicTree :: Term Id (Tree Integer)
cyclicTree = muN $ \ ~( _ : (lower -> x): (lower -> y):_) -> [
pure (Node 1000 [y]),
pure (Node 1 [Node 2 [], Node 3 [x,y]]),
pure (Node 2 [x])
]
getCyclicTree = eval (Exp cyclicTree)