Creating a manual distinct function without using the distinct command itself. getting there, have a function that works, but the “asc” part changes the order of the entries which makes the solution invalid.
Creating a manual distinct function without using the distinct command itself. getting there, have a function that works, but the “asc” part changes the order of the entries which makes the solution invalid.
{x where (x?x)=til count x} is a translation of the classic APL ((V?V)=??V)/V Alternatively ‘key group’ but that’s cheating.
APL teachers used to set problems like this as training exercises. APL has symbols where q has keywords. So for example, the APL equivalent of iasc
is ?
. They were known as dead key problems, as in what would you do if this or that key didnt work?