J, unreasonable verb

1 0 0 1 verb 1 2 3 4
  result:1 4

The verb removes items from the list on the right that have 0 in the list on the left. I remember seeing this verb in the Dictionary, but I cannot find it again. Does anyone know this verb?

+3
source share
1 answer

That #.

: (1 2 , 3) . # Tally ( , ) Copy , , . , ( , ).

:

   1 0 0 1 # 1 2 3 4
1 4
+6

Source: https://habr.com/ru/post/1777115/


All Articles