Static ketos::function::SYSTEM_FNS
[−]
[src]
pub static SYSTEM_FNS: [SystemFn; 65]=
[SystemFn{arity: Min(0), callback: fn_add, doc: Some("Returns the sum of all arguments.\n\nGiven no arguments, returns the additive identity, `0`."),}, SystemFn{arity: Min(1), callback: fn_sub, doc: Some("Returns the cumulative difference between successive arguments."),}, SystemFn{arity: Min(0), callback: fn_mul, doc: Some("Returns the product of all arguments.\n\nGiven no arguments, returns the multiplicative identity, `1`."),}, SystemFn{arity: Exact(2), callback: fn_pow, doc: Some("Returns a base value raised to an exponent."),}, SystemFn{arity: Min(1), callback: fn_div, doc: Some("Returns the cumulative quotient of successive arguments."),}, SystemFn{arity: Min(1), callback: fn_floor_div, doc: Some("Returns the cumulative quotient of successive arguments,\nrounded toward negative infinity."),}, SystemFn{arity: Exact(2), callback: fn_rem, doc: Some("Returns the remainder of two arguments."),}, SystemFn{arity: Exact(2), callback: fn_shl, doc: Some("Returns an integer, bit shifted left by a given number."),}, SystemFn{arity: Exact(2), callback: fn_shr, doc: Some("Returns an integer, bit shifted right by a given number."),}, SystemFn{arity: Min(2), callback: fn_eq, doc: Some("Returns whether the given arguments compare equal to one another.\n\nValues of different types may not be compared. Attempts to do so will\nresult in an error."),}, SystemFn{arity: Min(2), callback: fn_ne, doc: Some("Returns whether each given argument differs in value from each other argument.\n\nValues of different types may not be compared. Attempts to do so will\nresult in an error."),}, SystemFn{arity: Min(2), callback: fn_weak_eq, doc: Some("Returns whether the given arguments compare equal to one another.\n\nComparing values of different types will yield `false`."),}, SystemFn{arity: Min(2), callback: fn_weak_ne, doc: Some("Returns whether the given arguments compare not equal to one another.\n\nComparing values of different types will yield `true`."),}, SystemFn{arity: Min(2), callback: fn_lt, doc: Some("Returns whether each argument compares less than each successive argument.\n\nValues of different types may not be compared. Attempts to do so will\nresult in an error."),}, SystemFn{arity: Min(2), callback: fn_gt, doc: Some("Returns whether each argument compares greater than each successive argument.\n\nValues of different types may not be compared. Attempts to do so will\nresult in an error."),}, SystemFn{arity: Min(2), callback: fn_le, doc: Some("Returns whether each argument compares less than or equal to each\nsuccessive argument.\n\nValues of different types may not be compared. Attempts to do so will\nresult in an error."),}, SystemFn{arity: Min(2), callback: fn_ge, doc: Some("Returns whether each argument compares greater than or equal to each\nsuccessive argument.\n\nValues of different types may not be compared. Attempts to do so will\nresult in an error."),}, SystemFn{arity: Min(1), callback: fn_zero, doc: Some("Returns whether all given values are equal to zero."),}, SystemFn{arity: Min(1), callback: fn_max, doc: Some("Returns the greatest value of given arguments."),}, SystemFn{arity: Min(1), callback: fn_min, doc: Some("Returns the least value of given arguments."),}, SystemFn{arity: Min(1), callback: fn_append, doc: Some("Append a series of elements to a given list."),}, SystemFn{arity: Exact(2), callback: fn_elt, doc: Some("Returns an element from a sequence, starting at zero index."),}, SystemFn{arity: Min(1), callback: fn_concat, doc: Some("Concatenates a series of sequences."),}, SystemFn{arity: Min(1), callback: fn_join, doc: Some("Joins a series of lists or strings and chars using a separator value."),}, SystemFn{arity: Exact(1), callback: fn_len, doc: Some("Returns the length of the given sequence.\n\nString length is in bytes rather than characters."),}, SystemFn{arity: Range(2, 3), callback: fn_slice, doc: Some("Returns a subsequence of a list or string."),}, SystemFn{arity: Exact(1), callback: fn_first, doc: Some("Returns the first element of the given list or string."),}, SystemFn{arity: Exact(1), callback: fn_second, doc: Some("Returns the second element of the given list."),}, SystemFn{arity: Exact(1), callback: fn_last, doc: Some("Returns the last element of the given list or string."),}, SystemFn{arity: Exact(1), callback: fn_init, doc: Some("Returns all but the last element of the given list or string."),}, SystemFn{arity: Exact(1), callback: fn_tail, doc: Some("Returns all but the first element of the given list or string."),}, SystemFn{arity: Min(0), callback: fn_list, doc: Some("Returns a list of values. In contrast with the `\'(a b c ...)` list\nconstruction syntax, this function will evaluate each of its arguments."),}, SystemFn{arity: Exact(1), callback: fn_reverse, doc: Some("Returns a list in reverse order."),}, SystemFn{arity: Exact(1), callback: fn_abs, doc: Some("Returns the absolute value of the given numerical value."),}, SystemFn{arity: Exact(1), callback: fn_ceil, doc: Some("Returns a number value rounded toward positive infinity."),}, SystemFn{arity: Exact(1), callback: fn_floor, doc: Some("Returns a number value rounded toward negative infinity."),}, SystemFn{arity: Exact(1), callback: fn_round, doc: Some("Returns a number rounded to the nearest integer.\nRounds half-way cases away from zero."),}, SystemFn{arity: Exact(1), callback: fn_trunc, doc: Some("Returns a number rounded toward zero."),}, SystemFn{arity: Exact(1), callback: fn_int, doc: Some("Truncates a float or ratio value and returns its whole portion as an integer.\n\nIf the given value is infinite or `NaN`, an error will result."),}, SystemFn{arity: Exact(1), callback: fn_float, doc: Some("Returns the given value as a floating point value."),}, SystemFn{arity: Min(0), callback: fn_inf, doc: Some("Returns whether all given arguments are equal to positive or negative infinity.\n\nGiven no arguments, returns the value of positive infinity."),}, SystemFn{arity: Min(0), callback: fn_nan, doc: Some("Returns whether all given arguments are equal to `NaN`.\n\nGiven no arguments, returns the value of `NaN`."),}, SystemFn{arity: Exact(1), callback: fn_denom, doc: Some("Returns the denominator of a ratio."),}, SystemFn{arity: Exact(1), callback: fn_fract, doc: Some("Returns the fractional portion of a float or ratio."),}, SystemFn{arity: Exact(1), callback: fn_numer, doc: Some("Returns the numerator of a ratio."),}, SystemFn{arity: Range(1, 2), callback: fn_rat, doc: Some("Returns the given numerical value as a ratio."),}, SystemFn{arity: Exact(1), callback: fn_recip, doc: Some("Returns the reciprocal of the given numeric value.\n\nIf the value is of type integer, the value returned will be a ratio."),}, SystemFn{arity: Exact(1), callback: fn_chars, doc: Some("Returns a string transformed into a list of characters."),}, SystemFn{arity: Exact(1), callback: fn_string, doc: Some("Returns an argument converted into a string."),}, SystemFn{arity: Exact(1), callback: fn_path, doc: Some("Returns an argument converted into a path."),}, SystemFn{arity: Exact(1), callback: fn_bytes, doc: Some("Returns an argument converted into a byte string."),}, SystemFn{arity: Exact(1), callback: fn_id, doc: Some("Returns the unmodified value of the argument received."),}, SystemFn{arity: Exact(2), callback: fn_is, doc: Some(" (is type value)\n\nReturns whether a given expression matches the named type.\n\n`is` also accepts `\'number` as a type name, which matches `integer`, `float`,\nand `ratio` type values."),}, SystemFn{arity: Exact(2), callback: fn_is_instance, doc: Some(" (is-instance def value)\n\nReturns whether a given struct value is an instance of\nthe named struct definition."),}, SystemFn{arity: Exact(1), callback: fn_null, doc: Some("Returns whether the given value is unit, `()`."),}, SystemFn{arity: Exact(1), callback: fn_type_of, doc: Some("Returns a name representing the type of the given value."),}, SystemFn{arity: Exact(2), callback: fn_dot, doc: Some(" (. value field-name)\n\nAccesses a field from a struct value."),}, SystemFn{arity: Min(1), callback: fn_dot_eq, doc: Some(" (.= struct :field value)\n\nReturns a new struct value with named fields replaced with new values."),}, SystemFn{arity: Min(1), callback: fn_new, doc: Some(" (new struct-def :field value)\n\nCreates a struct value."),}, SystemFn{arity: Min(1), callback: fn_format, doc: Some("Returns a formatted string."),}, SystemFn{arity: Min(1), callback: fn_print, doc: Some("Prints a formatted string to `stdout`."),}, SystemFn{arity: Min(1), callback: fn_println, doc: Some("Prints a formatted string to `stdout`, followed by a newline."),}, SystemFn{arity: Range(0, 1), callback: fn_panic, doc: Some("Immediately interrupts execution upon evaluation.\n\nIt accepts an optional parameter describing the reason for the panic."),}, SystemFn{arity: Exact(2), callback: fn_xor, doc: Some("Returns the exclusive-or of the given boolean values."),}, SystemFn{arity: Exact(1), callback: fn_not, doc: Some("Returns the inverse of the given boolean value."),}]
System function implementations.
These names must correspond exactly to the first NUM_SYSTEM_FNS
standard names defined in name.rs
.