Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "dataflow"

Index

Variables

Const bi

bi: StackFn = defWord([[keep], dip, exec])

First applies p to the value x, then applies q to the same value.

( x p q -- px qx )

Const bi2

bi2: StackFn = defWord([[keep2], dip, exec])

First applies p to the two input values x y, then applies q to the same values.

( x y p q -- pxy qxy )

Const bi3

bi3: StackFn = defWord([[keep3], dip, exec])

First applies p to the three input values x y z, then applies q to the same values.

( x y z p q -- pxyz qxyz )

Const bia

bia: StackFn = defWord([dup, bis])

Applies the quotation q to x, then to y.

( x y q -- qx qy )

Const bia2

bia2: StackFn = defWord([dup, bis2])

Applies the quotation q to x y, then to z w.

( x y z w q -- qxy qzw )

Const bis

bis: StackFn = defWord([[dip], dip, exec])

Applies p to x, then applies q to y.

( x y p q -- px qy )

Const bis2

bis2: StackFn = defWord([[dip2], dip, exec])

Applies p to a b, then applies q to c d.

( a b c d p q -- pab qcd )

Const both

both: StackFn = defWord([bia, and])

Applies q individually to both input vals x y and combines results with and. The final result will be true if both interim results were truthy.

( x y q -- qx && qy )

Const dip2

dip2: StackFn = defWord([swap, [dip], dip])

Removes x y from d-stack, calls q and restores removed vals to the top of the d-stack after quotation is finished.

( x y q -- x y )

Const dip3

dip3: StackFn = defWord([swap, [dip2], dip])

Removes x y z from d-stack, calls q and restores removed vals to the top of the d-stack after quotation is finished.

( x y z q -- x y z )

Const dip4

dip4: StackFn = defWord([swap, [dip3], dip])

Removes x y z w from d-stack, calls q and restores removed vals to the top of the d-stack after quotation is finished.

( x y z w q -- x y z w )

Const either

either: StackFn = defWord([bia, or])

Applies q individually to both input vals x y and combines results with or. The final result will be true if at least one of the interim results was truthy.

( x y q -- qx || qy )

Const keep

keep: StackFn = defWord([over, [exec], dip])

Calls a quotation with a value on the d-stack, restoring the value after quotation finished.

( x q -- .. x )

Const keep2

keep2: StackFn = defWord([[dup2], dip, dip2])

Call a quotation with two values on the stack, restoring the values after quotation finished.

( x y q -- .. x y )

Const keep3

keep3: StackFn = defWord([[dup3], dip, dip3])

Call a quotation with three values on the stack, restoring the values after quotation finished.

( x y z q -- .. x y z )

Const tri

tri: StackFn = defWord([[[keep], dip, keep], dip, exec])

Applies p to x, then q to x, and finally r to x

( x p q r -- px qx rx )

Const tri2

tri2: StackFn = defWord([[[keep2], dip, keep2], dip, exec])

Applies p to the two input values x y, then same with q, and finally with r.

( x y p q r -- pxy qxy rxy )

Const tri3

tri3: StackFn = defWord([[[keep3], dip, keep3], dip, exec])

Applies p to the three input values x y z, then same with q, and finally with r.

( x y z p q r -- pxyz qxyz rxyz )

Const tria

tria: StackFn = defWord([dup, dup, tris])

Applies the q to x, then to y, and finally to z.

( x y z q -- qx qy qz )

Const tria2

tria2: StackFn = defWord([dup, dup, tris2])

Applies the quotation to u v, then to w x, and then to y z.

( u v w x y z q -- quv qwx qyz )

Const tris

tris: StackFn = defWord([[[dip2], dip, dip], dip, exec])

Applies p to x, then q to y, and finally r to z.

( x y z p q r -- )

Const tris2

tris2: StackFn = defWord([[dip4], dip2, bis2])

Applies p to u v, then q to w x, and finally r to y z.

( u v w x y z p q r -- puv qwx ryz )

Functions

Const dip

  • Removes x from d-stack, calls q and restores x to the top of the d-stack after quotation is finished.

    ( x q -- x )

    Same behavior as: [swap, movdr, exec, movrd], only the current implementation doesn't use r-stack and stashes x off stack.

    Parameters

    Returns StackContext

Generated using TypeDoc