klequis / zz-haskell-notebook

Notes from learning Haskell
1 stars 0 forks source link

Concatenation #36

Open klequis opened 2 years ago

klequis commented 2 years ago

Concatenation is the joining together of sequences of values. Often in Haskell, this is meant with respect to the [], or list, datatype, which also applies to String (which, as we know, is [Char]). The concatenation function in Haskell is ++, which has type [a] -> [a] -> [a]. For example:

Prelude> "tacos" ++ " " ++ "rock" 

Results in tacos rock