i have a list
[1,1,1,1,1]
and i am trying to write function which will return list
[2,3,4,5,6]
i want to use function map like this
map (+1) [1,1,1,1,1]
which will return
[2,2,2,2,2]
after that i want to call map function on last four elements of returned list so after i get [2,2,2,2,2] i want to use map on last four [2,2,2,2] that will return [3,3,3,3] and replace last four elements from first map call so i get [2,3,3,3,3] etc..
map (+1)[1,1,1,1,1]
map (+1) [2,2,2,2]
map (+1) [3,3,3]
map (+1) [4,4]
map (+1) [5]
returned:
[2,2,2,2,2]
[2,3,3,3,3]
[2,3,4,4,4]
[2,3,4,5,5]
[2,3,4,5,6]
i need to return only last list... btw this is only Simplified version, originaly i have list of lists ... i just cant figure how to call function how i described.. thanks.