# Compose

From NARS2000

In the following descriptions, *f* and *g* represent functions and *a* and *b* represent variables.

- The form
*f*∘*g*may be used both monadically and dyadically.

- Monadic: Z←
*f*∘*g*R is identical to Z←*f**g*R. - Dyadic: Z←L
*f*∘*g*R is identical to Z←L*f**g*R.

- The form
*f*∘b may be used monadically only.

- Monadic: Z←(
*f*∘*b*) R is identical to Z←R*f b*. - Note that parentheses are required around the function to avoid interpreting
*b*R as a strand.

- The form
*a*∘*g*may be used monadically only.

- Monadic: Z←
*a*∘*g*R is identical to Z←*a g*R.

- The derived function from the form
*a*∘*b*always signals a SYNTAX ERROR.

Compose can be useful for function assignment (but enclosing parentheses are necessary).

For example

p1←(1∘+¯2∘π) ⍝ 1 more than the Nth prime number

p1 ⍳9

3 4 6 8 12 14 18 20 24