🔍

Polyadic pick

Takes an arbitrary number of arguments and produces a list as a result. Unlike enlist it doesn't collapse to a vector if all elements are of the same type. Sometimes it is useful for generic list creation;

Syntax: pick[<x>〔; <y>〔; .. 〕〕]; ([] <x>〔; <y>〔; .. 〕〕)

o)pick[1;2;3;4]
1
2
3
4
o)([] 1;2;3;4)
1
2
3
4
o)

To convert a vector to a list use pick . x

o)v:!5;
o)pick . v
0
1
2
3
4
o)