Learn to spot expressions with sequential Eaches such as this one:
first each reverse each v / first of each reverse of each vand replace them with function compositions like this:
'[first;reverse] each v / last of each vCombine Compose with over to join longer sequences of functions:
('[;] over (upper;first;reverse)) each vIn general, seek to replace patterns like
f each g each … h each vwith any of (the forms are equivalent)
('[;] over (f;g;…;h)) each v
(('[;]/) (f;g;…;h)) each v
'[;]/[(f;g;…;h)] each v
'[;]/[(f;g;…;h)]'[v]Here’s another example:
q)reverse each ,':[1 2 3 4]
1
1 2
2 3
3 4
q)'[reverse;,]':[1 2 3 4]
1
1 2
2 3
3 4Compositions are faster than sequential Eaches (one iteration replaces many), and easier to read – and code!
0<('[type;key]) each paths / dictionaries in lists of paths