Jump to content

First-class functions: Difference between revisions

(add BQN)
Line 510:
<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 user defined function(<code>funsB ← {𝕏⁼}¨ funsA</code>).
 
<lang bqn>funsA ← ⟨⋆⟜2,-,•math.Sin,{𝕩×3}⟩
236

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.