3 ms·
(:) is a data constructor, not a type constructor, and its type is a -> [a] -> [a]. Examples of type constructors: [], Maybe, Either.
by hikarudo 13y ago
(:) is a data constructor, not a type constructor, and its type is a -> [a] -> [a]. Examples of type constructors: [], Maybe, Either.
- deleted 13y ago[deleted]
- delluminatus 13y agoThanks for the clarification. You might be able to tell, that I am only in the first stages of trying to learn Haskell.
- sold 13y agoTo be clear: [] can refer to two different entities, a data constructor (empty list) and a type constructor (the list type).