First-class functions: Difference between revisions
m
→{{header|BQN}}: Spaces and terminology
m (→{{header|BQN}}: Spaces and terminology) |
|||
Line 508:
BQN has full support for first class functions in the context of this wiki page. A more detailed article on BQN's implementation of functional programming is discussed [https://mlochbaum.github.io/BQN/doc/functional.html here].
<code>∘</code> (Atop) is used here to compose the two lists of functions given. Higher order functions are then used to apply the functions on a value. There is a slight change in value due to floating point inaccuracy.
BQN has provisions to invert builtin functions using <code>⁼</code> (Undo), and that can also be used for this demonstration, if we remove the
<lang bqn>funsA ← ⟨⋆⟜2,-,•math.Sin,{𝕩×3}⟩
|