Function Reference

This page is a list of every function you can use to build components.

  • ScreenWidth

    ::

    ->

    Number

  • ScreenHeight

    ::

    ->

    Number

  • Cell

    ::

    idx:

    Text

    ->

    Any

  • AbsoluteCell

    ::

    path:

    Array

    ->

    Any

  • AbsoluteCellExpression

    ::

    path:

    Array

    ->

    Any

  • Quote

    ::

    expr:

    Any

    ->

    Any

  • Eval

    ::

    expr:

    Any

    ->

    Any

  • EvalContainer

    ::

    container:

    Any

    ->

    Any

  • Var

    ::

    var:

    Text

    ->

    Any

  • NodeChildrenInfo

    ::

    path:

    Array

    ->

    Map

  • NodeCellsInfo

    ::

    path:

    Array

    ->

    Array

  • NodePersistence

    ::

    path:

    Array

    ->

    Text

  • NodeGeneratedBy

    ::

    path:

    Array

    ->

    ComponentRef

  • ChildNodeAbsolutePath

    ::

    relative:

    Array

    ->

    Array

  • CellAbsolutePath

    ::

    Text

    ->

    Array

  • Lowercase

    ::

    Text

    ->

    Text

  • Uppercase

    ::

    Text

    ->

    Text

  • ExpressionAsMap

    ::

    expr:

    Any

    ->

    Map

  • Not

    ::

    Bool

    ->

    Bool

  • Cos

    ::

    Number

    ->

    Number

  • Sin

    ::

    Number

    ->

    Number

  • Tan

    ::

    Number

    ->

    Number

  • Atan

    ::

    Number

    ->

    Number

  • Abs

    ::

    Number

    ->

    Number

  • Sqrt

    ::

    Number

    ->

    Number

  • ToText

    ::

    Any

    ->

    Text

  • ToArray

    ::

    Any

    ->

    Array

  • IsValid

    ::

    Any

    ->

    Bool

  • TextLength

    ::

    Text

    ->

    Number

  • MapKeys

    ::

    Map

    ->

    Array

  • MapKeysAndVals

    ::

    Map

    ->

    Array

  • Cells

    ::

    Component

    ->

    Map

  • ArrayLength

    ::

    Array

    ->

    Number

  • ArraySum

    ::

    Array

    ->

    Number

  • ArrayMax

    ::

    Array

    ->

    Number

  • ArrayMin

    ::

    Array

    ->

    Number

  • ArrayAccumulate

    ::

    Array

    ->

    Array

  • ArrayReverse

    ::

    Array

    ->

    Array

  • Transpose

    ::

    matrix:

    Array

    ->

    Array

  • AppCell

    ::

    idx:

    Text

    ->

    Any

  • Negate

    ::

    Number

    ->

    Number

  • IsInteger

    ::

    Number

    ->

    Bool

  • ToInteger

    ::

    num:

    Number

    ->

    Number

  • ParseNumber

    ::

    Text

    ->

    Number

  • ToDefaultFunction

    ::

    fn name:

    Text

    ->

    Any

  • AccessibleComponents

    ::

    owned only:

    Text

    ->

    Array

  • ComponentDocInfo

    ::

    component doc id:

    Text

    ->

    Map

  • BoolToInteger

    ::

    bool:

    Bool

    ->

    Number

  • ReferencedComponentId

    ::

    ComponentRef

    ->

    Text

  • ReferencedOverrides

    ::

    ComponentRef

    ->

    Component

  • ReferenceType

    ::

    ComponentRef

    ->

    Text

  • EventHandlerLength

    ::

    EventHandler

    ->

    Number

  • DisplayCharacter

    ::

    Text

    ->

    Shape

  • Radians

    ::

    angle:

    Number

    ->

    Angle

  • AnchorToNode

    ::

    node path:

    Array

    ->

    Anchor

  • EvalAs

    ::

    cell:

    Any

    from:

    Array

    ->

    Any

  • ParentCell

    ::

    idx:

    Text

    jumps:

    Number

    ->

    Any

  • ChildCell

    ::

    path:

    Array

    idx:

    Text

    ->

    Any

  • ChildrenCells

    ::

    idx:

    Text

    default:

    Any

    ->

    Array

  • ParentCellAbsolutePath

    ::

    idx:

    Text

    jumps:

    Number

    ->

    Array

  • ChildCellAbsolutePath

    ::

    relpath:

    Array

    idx:

    Text

    ->

    Array

  • ComponentRef

    ::

    id:

    Text

    overrides:

    Component

    ->

    ComponentRef

  • ForEachMap

    ::

    map:

    Map

    cube:

    Map|ComponentRef

    ->

    Array

  • ForEachArray

    ::

    array:

    Array

    cube:

    Map|ComponentRef

    ->

    Array

  • ForEachText

    ::

    text:

    Text

    cube:

    Map|ComponentRef

    ->

    Array

  • IndexArray

    ::

    index:

    Number

    array:

    Array

    ->

    Any

  • IndexMap

    ::

    key:

    Text

    map:

    Map

    ->

    Any

  • MapKeyAtIndex

    ::

    index:

    Number

    map:

    Map

    ->

    Text

  • Try

    ::

    try:

    Any

    default:

    Any

    ->

    Any

  • And

    ::

    Bool

    Bool

    ->

    Bool

  • Or

    ::

    Bool

    Bool

    ->

    Bool

  • TextJoin

    ::

    Text

    Text

    ->

    Text

  • ArrayJoin

    ::

    Array

    Array

    ->

    Array

  • Map1

    ::

    fn:

    Text

    over:

    Array

    ->

    Array

  • Eq

    ::

    Any

    Any

    ->

    Bool

  • IsGreater

    ::

    Number

    Number

    ->

    Bool

  • IsLess

    ::

    Number

    Number

    ->

    Bool

  • FilterByText

    ::

    filter:

    Text

    array:

    Array

    ->

    Array

  • Repeat

    ::

    count:

    Number

    to repeat:

    Any

    ->

    Array

  • ArrayPush

    ::

    array:

    Array

    value:

    Any

    ->

    Array

  • ArrayRemove

    ::

    array:

    Array

    index:

    Number

    ->

    Array

  • ArrayDrop

    ::

    array:

    Array

    count:

    Number

    ->

    Array

  • MakeMap

    ::

    key:

    Text

    value:

    Any

    ->

    Map

  • Max

    ::

    Number

    Number

    ->

    Number

  • Min

    ::

    Number

    Number

    ->

    Number

  • Add

    ::

    Number

    Number

    ->

    Number

  • Subtract

    ::

    Number

    Number

    ->

    Number

  • Multiply

    ::

    Number

    Number

    ->

    Number

  • Divide

    ::

    Number

    Number

    ->

    Number

  • Pow

    ::

    base:

    Number

    exp:

    Number

    ->

    Number

  • Modulo

    ::

    base:

    Number

    mod:

    Number

    ->

    Number

  • Atan2

    ::

    x:

    Number

    y:

    Number

    ->

    Number

  • ArrayTakeFirst

    ::

    count:

    Number

    array:

    Array

    ->

    Array

  • ArraySkipFirst

    ::

    count:

    Number

    array:

    Array

    ->

    Array

  • TextTakeFirst

    ::

    count:

    Number

    text:

    Text

    ->

    Text

  • TextSkipFirst

    ::

    count:

    Number

    text:

    Text

    ->

    Text

  • ToTextShort

    ::

    Any

    maxlen:

    Number

    ->

    Text

  • MatchText

    ::

    matcher:

    Map

    value:

    Text

    ->

    Any

  • ColorWithSaturation

    ::

    color:

    Color

    saturation:

    Number

    ->

    Color

  • ColorWithBrightness

    ::

    color:

    Color

    brightness:

    Number

    ->

    Color

  • WithOverrides

    ::

    to override:

    Map|ComponentRef

    overrides:

    Component

    ->

    Map|ComponentRef

  • TextSplit

    ::

    input:

    Text

    split_on:

    Text

    ->

    Array

  • GetCursor

    ::

    path:

    Array

    cursor name:

    Text

    ->

    Number

  • MapFromZip

    ::

    keys:

    Array

    values:

    Array

    ->

    Map

  • Range

    ::

    start:

    Number

    end:

    Number

    ->

    Array

  • SubIndex

    ::

    sub_index_type:

    Text

    value:

    Any

    ->

    SubIdx

  • ExprRef

    ::

    node path:

    Array

    cell index:

    Text

    sub index:

    Array

    ->

    Any

  • If

    ::

    cond:

    Bool

    then:

    Any

    else:

    Any

    ->

    Any

  • MapInsert

    ::

    map:

    Map

    key:

    Text

    val:

    Any

    ->

    Map

  • Map2

    ::

    fn:

    Text

    arg:

    Any

    over:

    Array

    ->

    Array

  • ArraySet

    ::

    array:

    Array

    idx:

    Number

    val:

    Any

    ->

    Array

  • Clamp

    ::

    array:

    Number

    idx:

    Number

    val:

    Number

    ->

    Number