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"{"Code":"UnexpectedValue","GotValue":"false","Kind":"Value"}

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" parseFloatNum{"Code":"UnexpectedValue","GotValue":"\"4.567abcdefgh\"","Kind":"Value"}

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)Num{"Code":"UnexpectedValue","GotValue":"\"ff\"","Kind":"Value"}
"ff" parseInt(16)Num255
"0xFF" parseInt(16)Num255{"Code":"UnexpectedValue","GotValue":"\"0xFF\"","Kind":"Value"}

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 " parseIntNum123{"Code":"UnexpectedValue","GotValue":"\" 123 \"","Kind":"Value"}
"077" parseIntNum77
"1.9" parseIntNum1{"Code":"UnexpectedValue","GotValue":"\"1.9\"","Kind":"Value"}
"ff" parseIntNum16{"Code":"UnexpectedValue","GotValue":"\"ff\"","Kind":"Value"}
"xyz" parseIntNum16{"Code":"UnexpectedValue","GotValue":"\"xyz\"","Kind":"Value"}

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