Comment

Comment by gandercrews

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?).
parent gandercrews 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton