3 ms·
Yeah, you can implement them like you could in anything - it varies per language but the lack of true higher order functions (anything except K) and lazy evalua
by rak1507 3y ago
Yeah, you can implement them like you could in anything - it varies per language but the lack of true higher order functions (anything except K) and lazy evaluation (all) means that there's not really an 'elegant' way for anything more than 1 term deep.
That's not to say that the 'combinators' in array languages are bad, they're very useful and a nice form of function composition that I wish most other languages had, but they're not really a true combinator in the lambda calculus sense. You can't pass the array language 'combinators' to other combinators.
- martinsmit 3y agoBQN[1] has higher order functions. Of the array languages I've used, it's by far my favourite. That said, I mostly solve small problems for fun in them. [1] https://mlochbaum.github.io/BQN/index.html https://mlochbaum.github.io/BQN/index.html
- rak1507 3y agoYeah BQN sort of has higher order functions but it still distinguishes between functions and data, so I don't think it would be that possible/easy to use combinatory logic style combinators. I haven't used BQN much though, so I could be wrong.