top | item 41758578

(no title)

smabie | 1 year ago

Don't most array languages have first class functions?

discuss

order

upghost|1 year ago

They have functions but not first class functions. Think (the ability to make) a vector/matrix of functions rather than just numbers :O

What could you do with that?

I don't know, but I bet some pretty cool stuff.

bear8642|1 year ago

> What could you do with that?

Just a couple quick ideas:

    fns ← f g h         ⍝ array of function

    fns[condition] args ⍝ select function to run
    (3 0 0⌿fns)    args ⍝ f f f args