Z^3 Deeper Features

Revision as of 14:45, 5 January 2024 by Joseph (talk | contribs) (Created page with " ==Function Composition== Functions can be composed using the @ operator. A chain of functions can also be composed using the same technique. Composed function works left to...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Function Composition

Functions can be composed using the @ operator. A chain of functions can also be composed using the same technique. Composed function works left to right.

a=(x=>x/3)@(x=>x+2);
a(3)

gives 3. 

First 3 is divided by 3, and then 2 is added to yield 3 as result.

a=(x=>x+2)@(x=>x/3);
a(3)
gives 
1.6666666666666667

a=(SIN@COS@TAN);
a(45)

gives
0.7749904090605793