7
In Haskell I can generate the alphabet as follows:
alfabeto = ['a'..'z']
To display it is enough:
alfabeto
"abcdefghijklmnopqrstuvwxyz"
However, I would like to know how I can put a space between the letters, this way:
"a b c d e f g h ..."
Doubts
- Is there any way to do this?
- Is there a specific operator I can use? If so, how should I use it?
Doubt: the result should be
"a b c ... z"
or"a b c ... z "
, with respect to the last space?– Woss
unwords [[x]|x <-['a'..'z']]
– JJoao