infixr 5 :-:
data List a = Empty | a :-: (List a) deriving (Show, Read, Eq, Ord)
we just wrote a :-: (List a) instead of Cons a (List a). Now, we can write out lists in our list type like so:
ghci> 3 :-: 4 :-: 5 :-: Empty
(:-:) 3 ((:-:) 4 ((:-:) 5 Empty))
ghci> let a = 3 :-: 4 :-: 5 :-: Empty
ghci> 100 :-: a
(:-:) 100 ((:-:) 3 ((:-:) 4 ((:-:) 5 Empty)))
I get that :-: is supposed to work like Cons but I don't really get why we are allowed to do that and how to actually type infixr 5 :-: .