Hacker News new | ask | show | jobs
by upghost 615 days ago
Just looked at the github -- wait, you wrote BQN? My God. Is there any prior art on this -- arraylangs with first class functions? I don't think very many people realize how incredible the semantic power of BQN is. The idea of an arraylang with first class functions... it truly staggers the imagination.

I feel like if I were able to wrap my head around it I would never want to code in anything else. Thanks again and excited to take another look at it!

2 comments

K, for a start. Whitney's earlier dialect A+ too. See https://aplwiki.com/wiki/First-class_function .
Don't most array languages have first class functions?
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.

> 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