mavo
mavo copied to clipboard
`random(list)` should work
Currently to pick a random item from a list you need to either do first(shuffle(list)) (which is also wasteful) or get(list, random(0, count(list))) which is also very roundabout. random(list) should just work.
would it make sense to have a second argument specifying the number of items you want returned? It would require returning an item if there is no argument and a list (even if it is a list of one item) if there is a second argument. Would this inconsistency be a bad choice?