Maybe we can let List.slice
support negative index and default value?
Such as: If we want to get recently 7 days price from a list to fill a charts, we can: prices.slice(-7..-1){ 0 }
If the list only have three days price. It will use the default value { index -> 0 }
emmm…There is a implement emmm xD
Thank you.