1module Main where
2
3import Prelude
4import Effect.Console (log)
5
6data Stream a = Cons a (Stream a)
7
8step :: forall a. Stream a -> Stream a
9step (Cons _ xs) = xs
10
11head :: forall a. Stream a -> a
12head xs | Cons x _ <- step xs = x
13
14main = log "Done"
15