fn
a function, which can be passed around like any value
1# fn: a function2|x| x * 2<fn>3# a typed function4fn(x: int) -> int { x * 2 }<fn>Example outputCtrl+Enter to run
syntax
Section titled “syntax”1# f(x) calls it2(|x| x * 2)(4)8Example outputCtrl+Enter to run
Functions that take it
Section titled “Functions that take it”docattach a description to your own function, shown by helpplota graph of the function f from x = a to x = b, drawn with braille dots, 60 characters wide and 16 lines tallrootan x where f(x) = 0derivthe slope of f at x (its derivative), estimated from f just either side of x, or with n its nth derivativeminimizethe x between lo and hi where f is smallestmaximizethe x between lo and hi where f is largestlimitwhat f(x) approaches as x approaches a, which can be inf or -infintegratethe area under f between a and b (its integral), where a and b can be inf or -infelasticityhow many percent demand changes per 1% change in price, for demand f at pricetimeithow long it takes to call f, which takes no argumentsanimateplay an animation in the terminal at fps frames a second
Example results generated on 2026-11-04. Ones using now, today or randomness will differ when you run them.