List(1,2,3).Splice(0, 0, List(4))
List(1,2,3).Splice(1, 0, List(4))
This is a huge bummer for the times when we would like to truly append an item to the end of the list.
How can I get
List(1,2,3,4)? Well, the best I can do is:
WithName(List(1,2,3), MyList, MyList.Splice(MyList.Count()+1, 0, List(4)))
If I were to come across this formula in a doc I would be quite confused as to what it was doing. It seems unnecessarily verbose considering what it’s doing is basically
MyList.Splice(0,0, whatever) returns the same thing as
MyList.Splice(1, 0, whatever) it would be nice to use
0 as append and
1 as prepend.