her.esy.fun/src/posts/0010-Haskell-Now/list.hs
Yann Esposito (Yogsototh) 7784f02483
wip
2019-12-25 16:35:56 +01:00

11 lines
227 B
Haskell

infixr 5 :::
data List a = Nil | a ::: (List a)
deriving (Show,Read,Eq,Ord)
convertList [] = Nil
convertList (x:xs) = x ::: convertList xs
main = do
print (0 ::: 1 ::: Nil)
print (convertList [0,1])