I've a field made of list of lists like this:
let list1 = ["a", "abcdefgh", "abc"]
I want to get a new field 5x5 such that there could be more then 5 lines or columns, but no less. It must be produced from the previous one by addition spaces ' ' or keeping them as they are, if there are more then 5 symbols. For additional lines no spaces needed. For example:
list2 = ["a ", "abcdefgh", "abc ", " ", " "]
or:
let list1 = ["a", "abcdefgh", "c", "d", "e", "f"]
list2 = ["a ", "abcdefgh", "c ", "d ", "e ", "f"]
I thought about map, replicate, and length, but I'm a little bit confused. If it's possible, don't use libs (or use Data.Map only). Thank you
map (\x -> ...).