Because underscores can be part of names, separate a name from the Drop operator with spaces.
q)n:3 q)n_ til 5 'n_ [0] n_ til 5 ^ q)n _ til 5 3 4 q)-2_ 3_ til 10 3 4 5 6 7
The null keyword will find nulls. You can use where not null to remove all nulls. Or, to remove leading and trailing nulls, you can count and Drop the nulls from each end. Note below the use of the Zen monks idiom to return both the boolean and its reverse. And commuting (switching the arguments of) Drop in order to use Over to apply it to a list of left arguments.
Hello and the greatest of thanks to the both of you. Lots of useful info. Chin chin.
I have warped headfirst into my next problem which is using these shiny new lists in a conditional.
I want to compare these two lists, when one item of the same position of each list is greater than the other, I want to put it into a new list with some output. I am encountering a ‘mismatched type’ error despite both lists only containing floats.
A:$[L1>L2;1;2]
Here’s the structure I am using. Please help! My knees are weak.
If Im following you, your two lists L1 and L2 are the same length. You want a list A of the same length in which item A[i] is the greater of L1[i] and L2[i].