Hacker News new | past | comments | ask | show | jobs | submit login

NARS2000, Dyalog APL, and dzaima/APL all have the Where function now. See https://aplwiki.com/wiki/Indices.



I'm not familiar with J but it also appears to have something similar. However the resulting code seems a bit more convoluted than the K version. +/ (I. a>3) { a


More idiomatic J might look like this: +/a#~a>3 .


Thanks! Should probably brush up on my APL, as I have last really used APL2 on a mainframe nearly 3 decades ago.

But I have gotten lazy and too comfortable with K.... oh well.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: