First-class functions: Difference between revisions

Content added Content deleted
Line 977: Line 977:
#symbol program =
#symbol program =
[
[
#var fs := (%(mathOp get&sin)(0), %(mathOp get&cos)(0), ()[ this power:3.0r ]).
#var fs := (%"mathOp.sin[0]", %"mathOp.cos[0]", ()[ this power:3.0r ]).
#var gs := (%(mathOp get&arcsin)(0), %(mathOp get&arccos)(0), ()[ this power:(1.0r / 3) ]).
#var gs := (%"mathOp.arcsin[0]", %"mathOp.arccos[0]", ()[ this power:(1.0r / 3) ]).


fs zip:gs &into: (:f:g)[ 0.5r compose:f:g ]
fs zip:gs &into: (:f:g)[ 0.5r compose:f:g ]