Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "ops"

Index

Functions

Const defOp1

  • defOp1(op: Fn<any, any>): (Anonymous function)
  • Higher order word. Replaces TOS of d-stack with result of given op.

    ( x -- y )

    Parameters

    • op: Fn<any, any>

      -

    Returns (Anonymous function)

Const defOp2

  • defOp2(op: Fn2<any, any, any>): (Anonymous function)
  • Higher order word. Takes 2 values from d-stack and writes back result from given op. The arg order is (TOS, TOS-1)

    ( a b -- c )

    Parameters

    • op: Fn2<any, any, any>

      -

    Returns (Anonymous function)

Const defOp2v

  • defOp2v(f: Fn2<any, any, any>): (Anonymous function)
  • Similar to map2, but for array operators. Either a or b can be a non-array value, but not both. Creates new array of result values. The result will have the same length as the shortest arg (if a and b have different lengths).

    • ( a b -- a ), if a is an array
    • ( a b -- b ), if a is not an array

    Parameters

    • f: Fn2<any, any, any>

      -

    Returns (Anonymous function)

Const op2vA

  • op2vA(f: Fn2<any, any, any>, a: any, b: any): any[]

Const op2vAB

  • op2vAB(f: Fn2<any, any, any>, a: any, b: any): any[]

Const op2vB

  • op2vB(f: Fn2<any, any, any>, a: any, b: any): any[]

Generated using TypeDoc