|
|
|
|
|
by gandercrews
2226 days ago
|
|
rewritten apl version w/ lambdas and commute (vs assignment & parens): {⍵/⍨⍵<50}{2*⍨⍵/⍨1=2|⍵}⍳10
1 9 25 49
About as short as I can make it, and while its longer than the pandas solution, the primitives are significantly more general (sqr, odd - why include these as language primitives?). |
|
As to your "why" question - I'm assuming to make a neat demo. Something like:
seems more difficult to pull off in a pipeline API.