2 ms·
not in the way you'd hope. due to the way APL is written and it's sort of philosophy of computation if you tried to be literal about you'd end up with a bunch
by Avshalom 5y ago
not in the way you'd hope.
due to the way APL is written and it's sort of philosophy of computation if you tried to be literal about you'd end up with a bunch of inscrutable nonsense anyways
consider https://www.aplwiki.com/wiki/FinnAPL_idiom_library#Inner_Product_.E2.88.A8..E2.89.A0_.E2.88.A7..3D_.2B..E2.89.A0_.2B..3D https://www.aplwiki.com/wiki/FinnAPL_idiom_library#Inner_Pro...
(⌽∨\⌽' '∨.≠X)/X would be
(reverse or scan reverse ' ' or prod = X) reduce X
or that infamous Game of Life one liner
life←{⊃1 ⍵ ∨.∧ 3 4 = +/ +/ 1 0 ¯1 ∘.⊖ 1 0 ¯1 ⌽¨ ⊂⍵}
life set {disclose 1 X or prod and 3 4 = + reduce + reduce 1 0 -1 bind prod rotf 1 0 -1 rot each enclose X}
Still just nonsense right? You'd end up writing very different code.
- niek_pas 5y ago> (reverse or scan reverse ' ' or prod = X) reduce X This just looks like Haskell.