Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Value Funcers

==

Checks two values for equality.

TypeValue
InputAnya value
other (param #1)Anyanother value
OutputBooltrue if the input is the same as other, false otherwise

Examples

ProgramTypeValueError
null ==nullBooltrue
null =={}Boolfalse
true ==trueBooltrue
true ==falseBoolfalse
true ==[]Boolfalse
1 ==1.0Booltrue
1 ==2Boolfalse
57 =="a"Boolfalse
"abc" =="abc"Booltrue
"" =="abc"Boolfalse
"" ==nullBoolfalse
[false, 1.0, "ab"] ==[false, 1, "a" +"b"]Booltrue
[] ==[11]Boolfalse
["a"] =={a: 1}Boolfalse
{a: 1, b: 2} =={b: 2, a: 1}Booltrue
{a: 1, b: 2} =={a: 2, b: 1}Boolfalse
{} ==[]Boolfalse

id

The identity function.

TypeValue
Input<A Any>any value
Output<A Any>the input value

Examples

ProgramTypeValueError
123 idNum123
"abc" idStr"abc"
false if id then 1 else fatal okNum"abc"Value error
Code: UnexpectedValue
Message: Component got an unexpected input value.
Got value: false

parseFloat

Parses the string representation of a floating-point number.

TypeValue
InputStra floating-point number in string representation
OutputNumthe corresponding Num value

Examples

ProgramTypeValueError
"4.567" parseFloatNum4.567
"4.567e3" parseFloatNum4567
"4.567abcdefgh" parseFloatNumValue error
Code: UnexpectedValue
Message: Component got an unexpected input value.
Got value: "4.567abcdefgh"

parseInt

Parses the string representation of an integer number.

TypeValue
InputStran integer number in string representation
base (param #1)Numthe base that the input is in
OutputNumthe corresponding Num value

Examples

ProgramTypeValueError
"123" parseInt(10)Num123
"ff" parseInt(10)NumValue error
Code: UnexpectedValue
Message: Component got an unexpected input value.
Got value: "ff"
"ff" parseInt(16)Num255
"0xFF" parseInt(16)Num255Value error
Code: UnexpectedValue
Message: Component got an unexpected input value.
Got value: "0xFF"

parseInt

Parses the string representation of a base-10 integer number.

TypeValue
InputStran integer number in base-10 string representation
OutputNumthe corresponding Num value

Examples

ProgramTypeValueError
"123" parseIntNum123
" 123 " parseIntNum123Value error
Code: UnexpectedValue
Message: Component got an unexpected input value.
Got value: " 123 "
"077" parseIntNum77
"1.9" parseIntNum1Value error
Code: UnexpectedValue
Message: Component got an unexpected input value.
Got value: "1.9"
"ff" parseIntNum16Value error
Code: UnexpectedValue
Message: Component got an unexpected input value.
Got value: "ff"
"xyz" parseIntNum16Value error
Code: UnexpectedValue
Message: Component got an unexpected input value.
Got value: "xyz"

parseJSON

TypeValue
InputStr
OutputAny

Examples

ProgramTypeValueError

toJSON

TypeValue
InputAny
OutputStr

Examples

ProgramTypeValueError

toObj

TypeValue
InputArr<Arr<Str, <A Any>>…>
OutputObj<<A Any>>

Examples

ProgramTypeValueError

toStr

TypeValue
InputAny
OutputStr

Examples

ProgramTypeValueError