Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
mlochbaum
on March 13, 2020
|
parent
|
context
|
favorite
| on:
K Language (2011)
NARS2000, Dyalog APL, and dzaima/APL all have the Where function now. See
https://aplwiki.com/wiki/Indices
.
miltondts
on March 13, 2020
|
next
[–]
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
TheRealDevonMcC
on March 21, 2020
|
parent
|
next
[–]
More idiomatic J might look like this: +/a#~a>3 .
beagle3
on March 13, 2020
|
prev
[–]
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: