Every builtin function that isn't a method of a type. A free function is called by name - range(0, 3) - or through #builtin - #builtin.range(0, 3), which reaches the builtin even if your own code defines a range too. A namespace's functions are called on the namespace's name - Math.min(1, 2). The methods each type comes with, like "abc".size(), are listed on that type's card on Builtin Types, and a walkthrough of them in real programs is in the Examples.
The primitive number operations - ADD_U64_U64, CAST_F64_S32, ... - aren't free functions: they're reached through #builtin.intrinsic and listed on Intrinsics.
#rangeThe numbers from start up to, but not including, end - the same as start..<end. Empty when end <= start.
#regexCompiles a regular expression from a pattern and its flags - the same as Regex.new. An invalid pattern is a ParseError.
#formatFills each {} in template with the next value's toString(), and each {n} with the nth value (from 0). {{ and }} are literal braces. A placeholder without a matching value is a ParseError.
#joinpathJoins path segments with /, dropping duplicate separators - joinPath("a/", "b", "c.rfn") is "a/b/c.rfn". A segment starting with / starts over from the root.
#basenameThe last segment of a path - baseName("src/main.rfn") is "main.rfn".
#dirnameEverything before the last segment of a path - dirName("src/main.rfn") is "src", and "." when there's no directory part.
#extensionThe last segment's extension without its dot - "rfn" for "src/main.rfn", and "" when there's none.
#exitEnds the program with the given exit code. Pending defer blocks still run first.
#panicHands message to &panicHandler, which by default prints it on standard error and stops the program - for states that mean a bug, not a failure the caller should handle (return an Error for those). Pending defer blocks still run first.
#todoA placeholder for code that isn't written yet: type-checks as anything, and panics with message when reached.
#unreachableMarks a branch that can't happen - panics with message if it does.
#typeofThe runtime type of value - its actual type, not the static one (see #runtime.typeof).
#hashThe same as value.hash(), as a function to pass around.
#cloneThe same as value.clone(), as a function to pass around.
#tostringThe same as value.toString(), as a function to pass around - e.g. xs.map(toString).
#compareHow a compares to b - the same as a.compare(b), as a function to pass to sorting.
#swapIts two arguments in the other order: (b, a). set (x, y) := swap(x, y) exchanges two variables.
#identityReturns its argument unchanged - a no-op to pass where a function is required.
#constantA function that ignores its argument and always returns value.
#composef after g: a function that runs g and passes its result to f.
#pipeThe functions run left to right, each on the previous one's result - pipe(f, g)(x) is g(f(x)), the same as x |> f |> g. With no functions it's identity.
#memoizeWraps f so each distinct argument is computed once, and later calls with an equal argument return the stored result.
#zipPairs up the elements of a and b by position, stopping at the end of the shorter one.
#enumerateEach element paired with its position, from 0.
#repeatvalue, count times - endlessly when count is undefined.
#iteratestart, then next(start), then next of that, and so on - ending when next returns undefined.
#chainEvery element of the first source, then every element of the next, and so on.
#cartesianEvery pair of an element of a with an element of b, with a's element changing slowest.
#countstart, start + step, start + 2 * step, ... - endlessly.
#math-minThe smallest of its arguments.
#math-maxThe largest of its arguments.
#math-piπ, the ratio of a circle's circumference to its diameter - 3.14159....
#math-tauτ = 2π, a full turn in radians.
#math-eEuler's number, the base of the natural logarithm - 2.71828....
#math-infinityPositive infinity. Its negation is negative infinity.
#math-nanNot-a-number - the result of an undefined operation like 0 / 0. It isn't equal to anything, itself included; check with Math.isNan.
#math-absThe absolute value of x.
#math-sign-1, 0 or 1, matching the sign of x.
#math-clampx limited to the range low to high, both included.
#math-sumAll the arguments added together - T.zero() when there are none.
#math-productAll the arguments multiplied together - T.one() when there are none.
#math-meanThe arithmetic mean of the arguments. No arguments is an EmptyError.
#math-medianThe middle argument once they're sorted - the mean of the two middle ones when there's an even number. No arguments is an EmptyError.
#math-floorThe largest whole number not greater than x.
#math-ceilThe smallest whole number not less than x.
#math-roundx rounded to decimals places after the point, halves away from zero.
#math-truncx with its fractional part dropped - rounded toward zero.
#math-fractThe fractional part of x: x - Math.trunc(x).
#math-sqrtThe square root of x - NaN below zero.
#math-cbrtThe cube root of x, negative for a negative x.
#math-hypotThe square root of the sum of the squares of the arguments - the length of a vector with those components - computed without overflowing on the way.
#math-powbase raised to exponent - the same as base ^ exponent.
#math-expe raised to x.
#math-lnThe natural (base-e) logarithm of x.
#math-logThe logarithm of x in base.
#math-log2The base-2 logarithm of x.
#math-log10The base-10 logarithm of x.
#math-sinThe sine of an angle in radians.
#math-cosThe cosine of an angle in radians.
#math-tanThe tangent of an angle in radians.
#math-asinThe angle, in radians from -π/2 to π/2, whose sine is x.
#math-acosThe angle, in radians from 0 to π, whose cosine is x.
#math-atanThe angle, in radians from -π/2 to π/2, whose tangent is x.
#math-atan2The angle, in radians from -π to π, from the positive x-axis to the point (x, y) - unlike atan(y / x), it tells the quadrants apart.
#math-sinhThe hyperbolic sine of x.
#math-coshThe hyperbolic cosine of x.
#math-tanhThe hyperbolic tangent of x.
#math-toradiansAn angle in degrees converted to radians.
#math-todegreesAn angle in radians converted to degrees.
#math-lerpThe point t of the way from a to b: a at t = 0, b at t = 1. t outside 0 to 1 extrapolates.
#math-inverselerpHow far x is along the way from a to b - the t for which Math.lerp(a, b, t) is x.
#math-remapx moved from one range to the same relative place in another - Math.remap(5, 0..<10, 100..<200) is 150.
#math-gcdThe greatest common divisor of a and b - never negative, and 0 only when both are.
#math-lcmThe least common multiple of a and b - never negative, and 0 when either is.
#math-factorial1 * 2 * ... * n, and 1 for 0. A result too large for the type is an OverflowError.
#math-binomialThe number of ways to choose k items out of n - 0 when k > n.
#math-isprimeWhether n is a prime number.
#math-isnanWhether x is not-a-number. x == Math.nan() is always false, so this is the only way to check.
#math-isfiniteWhether x is neither infinite nor not-a-number.
#math-approxequalsWhether a and b differ by at most tolerance, relative to the larger of the two (absolute below 1) - for comparing results of float arithmetic, where == is too strict.