Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Beats the previous APL answer by one byte, while being aA traditional style APL function, so iteven works on all versions of APL that ever existedlegacy APLs.
APL, 6 bytes
f →⍞←1
Beats the previous APL answer by one byte, while being a traditional style APL function, so it works on all versions of APL that ever existed.
APL, 6 4 bytes
→⍞←1
A traditional style APL function, so even works on all legacy APLs.