Looking for a built-in function that will do the following:
mklist x = [x]
The advantage is that I can use it in the composition to create a list of one item. Understand that (copy 1) is available, but is there a more direct function? It would be useful in such situations:
["Alice", "Bob", "Charlie"] >>= mklist . ("Hello " ++)
source
share