Because there aren't enough golfing languages already™
Paradoc is a golfing language in the stack-based lineage of GolfScript, heavily inspired by it and CJam. Other inspirations include 05AB1E, Jelly, Pyth, and rhoScript.
Like many of these other things, Paradoc is a work in progress. Still, I like to think we have some pretty reasonable documentation.
Some example programs:
Hello, world! (unterminated strings are on the TODO list)
"Hello, world!"
Print squares from 0 to 100, separated by spaces
s¹²m .. 4 bytes (if encoded as CP1252)
sA)2pm .. 6 ASCII characters
_space 11 Square_map .. Expanded version
Print Fibonacci numbers from 0 to 89, separated by spaces:
sZ1A+kx .. 7 bytes / ASCII characters
_space 0 1 10 +_keep_xloop .. Expanded version
Paradoc is written in Python 3 (and uses mypy (optional static typing) annotations extensively). REPL:
python3 -m paradoc
Run a file:
python3 -m paradoc source_file.prdc
Evaluate a command:
python3 -m paradoc -e "sA)2pm"
In decreasing order of importance:
The most important design goal for Paradoc is that programs should be writable in a natural literate style without much effort, even for complicated problems, although the naturally resulting programs may not lend themselves to immediate golfing. This includes both naming, formatting, and structure of logic.
Of course, with its unusual order of operations, stack-based language can only be so natural to write in. The biggest non-negotiable concrete consequence, though, is that Paradoc must have support for long alphabetic identifiers. This is something GolfScript did that, based on what I've seen, most of its descendants and more recent golfing languages have abandoned in favor of optimizing for brevity. While the reduction in short identifier namespace/usability certainly puts Paradoc at a disadvantage for achieving that low golf score, I am OK with that tradeoff in order to make coding directly in Paradoc easier. Even then, I don't think Paradoc has sacrificed very much golfability in its design.
Specifically, Paradoc supports (admittedly somewhat bizarre)
Capitalized_snake_case identifiers of arbitrary length. It treats the
underscore as a lowercase letter and parses identifiers as one capital
letter followed by zero or more lowercase letters. Happily, this frees up
the lowercase letter to perform a host of other useful effects on other
things.
Another corollary is that Paradoc must have support for legible
comments: towards that end, you can start a simple end-of-line comment
with .., which is pretty visually clean as end-of-line comment markers
go, in my opinion.
The definitions, names, and behavior of built-ins and variables should be
simple, predictable, and consistent. When the most obvious mnemonic
names are not possible, they should at least be consistent; for example,
x and * perform similar operations because they look similar, the
letter D ("downward") consistently reverses lists, and variants of A and
O refer to maximum and minimum respectively.
A more specific rule is that everything must have a mnemonic. Paradoc will not, for example, use ¾ to do something unrelated to 3, 4, or fractions. Fortunately, mnemonics are not that hard to make.
Another specific concrete consequence: Built-ins should never read an integer constant from the stack in order to select one of several completely dissimilar operations. Compared to the other golfing languages, this is pretty much not an issue at all, since we allow alphabetic identifiers of arbitrary length and are thus in no danger of running out of identifiers.
Consistency internal to Paradoc is slightly more important than simplicity/predictability from an external viewpoint. For example, if there are two namespaces in which we want to define a similar operation, and there's a name with an easy mnemonic available in only one namespace and a name with an awkward mnemonic available in both namespaces, we will prefer to use the awkward name in both namespaces.
When none of the above concerns apply, Paradoc should be similar to
pre-existing languages, mostly GolfScript/CJam but also Python (so
Ruby/Java-isms may need to be replaced with their Python counterparts). A
notable example is that * no longer folds/joins; instead we have R (for
"reduce", which is what the corresponding function in Python is called),
and allows * on a block and an integer n to behave consistently with
* on a block and the half-open range [0..n), a coercion made by many
built-ins.
Literate programs should not be totally different modes of the parser/interpreter (contrast rhoScript or "big Pyth"). Literate Paradoc and golfed Paradoc should just be styles of programming used by the programmer that can coexist in one program, and it should be possible to manually translate between them.
Debugging, at least printf-style debugging if not more, should be natural and easy.
Paradoc should be golfable. Obviously this is important (and is the reason for the choice of identifiers), but it should not override the above concerns.
Although Paradoc uses characters from the common Windows-1252 encoding, its golfability (in terms of number of bytes) should degrade gracefully when restricted to being written in UTF-8 or even ASCII.
There also exist a few control codes that we have been replaced with custom characters, although this is still quite unstable.
Paradoc parses tokens differently; identifiers begin with either a symbol (excluding the underscore and various other characters taken in the syntax) or an uppercase letter, and are followed by zero or more lowercase letters or underscores.
Like CJam, Paradoc uses single quotes to escape and push the following character, no matter what it is.
Paradoc swaps . and : from GolfScript/CJam, using . for assignment
and : for duplicating top of stack. Rationale: I think : is more
mnemonic for "duplicate" since there are two dots (Befunge also uses it),
and it feels more like an inverse to ;. At the same time, this clears up
some corners of the syntax more elegantly. First, it allows us to parse
numbers starting with a decimal point like .618, and it allows us to
begin end-of-line comments with .., which are a high priority for
Paradoc, easy to type, and not visually noisy.
In Paradoc, + on a list and block filters the list by the block, instead
of ,. This is to allow symmetry with -, which filters out elements
from the list that satisfy the block. , instead filters the lists and
returns the indexes of elements that satisfy the block. Further, , on a
list zips it with its indices; instead, L computes the length of a list.
In Paradoc, R joins sequences with other sequences and reduces/folds
lists by a block, instead of *, which instead repeats a block over a list
or the half-open range [0..n), without pushing anything onto the stack,
but instead putting each element into the special variable X. This allows
* to behave consistently on integers n and half-open ranges [0..n),
and for it to perform the more intuitive Cartesian products on sequences.
In Paradoc, @ and # are changed to what I consider more mnemonic
operations. @ finds the index of an element or substring in a sequence
(so it figures out where the element is at) and # counts the
number of occurrences of that element of substring. Exponentiation is
relegated to the (non-ASCII character) ˆ or *p, which seems a more
reasonable mnemonic anyway (although I thought the audial mnemonic of
Pound for # and Power was pretty reasonable) and allows it to
also perform list exponentiation in the sense of Cartesian products. There
is currently no one-character built-in for the stack-manipulation analogue
of @ in GolfScript/CJam.
Most of the alphabetic built-ins are different, of course.
End-of-line comments start with two periods .. or two em dashes ——.
A shebang line at the start of a file is also considered an end-of-line comment.
Strings are delimited by double quotes. Inside a string literal, the only special characters are double quotes and backslashes, the latter of which escape double quotes and themselves, and nothing else. (So multiline string literals are totally fine.) Normally, they simply push themselves onto the stack.
Characters consist of a single quote followed by a single character. No characters after the single quote are special.
Numbers consist mostly of ASCII digits. There can be a decimal point, and it can start the numeric literal, but if there is one, there must be at least one digit after it. Scientific notation is supported.
Numeric literals can be preceded by an em dash (—, U+2014) to make them
negative. (Alternatively, you can also append an m; more on that later.)
Curly braces delimit code blocks. Code is parsed inside of them, and they nest.
Assignment is performed with the period . or the em dash —, and assigns
the value on top of the stack to the following identifier.
Identifiers consist of an "uppercase letter" followed by zero or more "lowercase letters" or underscores.
Paradoc considers most symbols to be uppercase letters, including whitespace. Lowercase letters include the typical ASCII lowercase letters and other lowercase letters in CP1252. Digits and underscores are neither.
The set of special characters that can't appear in identifiers are the
period ., the em dash —, the single quote ', the double quote ",
all ASCII digits 0123456789, and curly braces {}. All other characters
(letters, symbols, whitespace including newlines, control characters) are
valid.
A very important syntactic concept is a trailer, which basically refers to sequences of lowercase letters directly following some other token. Trailers modify the behavior of the token they follow. A trailer consists of either a single lowercase letter or an underscore followed by zero or more lowercase letters.
For example, there is a block trailer called _bind or b. You can modify
the built-in block + by appending it, to get +b or +_bind, which does
something related to +. Trailers can be chained; +bm is + with the
trailers b and m.
Note that this means identifiers are actually ambiguous. If you write
Dup, how does Paradoc if you mean the identifier Dup, or a built-in
called Du with a trailer p, or a built-in called D with two trailers,
u and p? The answer is that Paradoc doesn't know this, and simply tries
each of these possibilities in turn until it finds an identifier that it
has something associated with. Then it applies (or tries to apply) all of
the trailers following it.
More precisely, when Paradoc encounters an identifier, it first tries to look up the entire identifier. While this fails, if the identifier has an underscore, it cuts off the part including and after the last underscore, and if not it cuts off the last (lowercase) letter. It treats the part it cut off as a trailer. It repeats this process, cutting off trailers, until it finds an identifier that it can look up. Then it applies all the trailers it cut off in the order they appear in the source (the reverse of the order in which they were cut off).
Not all trailers for all letters exist for all types. If Paradoc finds an identifier but fails to apply the trailers following it, it does not keep examining shorter identifiers.
There are also global trailers, which come right at the start of the program. These haven't been documented yet, sorry.
Paradoc is stack-based. It starts with an empty stack and just runs each thing in the code in sequence. Things run on the stack.
The data types are ints, floats, Chars, complex numbers, strings, (heterogeneous) lists, and blocks (executable things). When Paradoc sees an identifier, it modifies it with trailers, if any, and then executes it if it's a block and the final trailer is not reluctant.
Floats are often coerced to ints by truncation. Complex numbers are often coerced to floats by taking the real part (and then possibly to ints by truncation). Support for complex numbers across all built-ins is still in alpha though.
Paradoc keeps track of marks in the stack, which you can create with [.
These are usually placed for ] to be called later and collect elements above
the last mark into a list. If a mark is at the top of the stack and an element
is popped, it moves down; if elements are pushed after it, it stays below them.
Note that many higher-order functions and the like will execute a block in a
protected "shadow" stack that start with a mark in it. Although the shadow
stack "bottoms out" into the underlying stack, so trying to pop from the shadow
stack when it's empty will pop from the underlying stack instead, the mark will
not leave the shadow stack, and its presence or absence won't affect the
underlying stack when it's destroyed. This way, something like ]z does the
right thing.
There are a few variations of shadow stacks, but these are kind of implementation details.
A handful of identifiers are specially aliased to the X-stack, a place where the current element/index being operated on is pushed in most loops.
Usually, an element and an index are pushed together, the element on top. As
you'd expect, elements higher on the stack are easier to access. X is the top
element, Y is the second-to-top (so usually the index), Z is the third;
these names are pretty stable. The following elements currently go Xx, Xy,
Xz, Yx, Yy, Yz, etc, but they should be considered unstable.
See * for examples.
In addition, the X-stack starts with a few elements on program start to provide single-letter aliases for them, but these should also be considered unstable.
Note that there's no implicit input; however, global trailers can configure an input trigger, the result of which is that when you try to pop from an empty stack, Paradoc will read input and offer it to you as the result of the pop. (Note that you will pop things in the order they're read, which is the opposite order of how lists are usually ordered on the stack!)
You can also explicitly read input with V.
Paradoc has flexible mutable data structures, which are called hoards
mostly because H was the single unallocated letter when we got to the
concept. Hoards start out as empty lists, but depending on how you use them,
they will automagically become deques or dictionaries. The primary interface
for mutation is through hoard trailers.
As noted, Paradoc is a work in progress, so although there is autogenerated documentation here for all the built-ins, they are all subject to change. Some of then are more likely to change than others, though, so each one is labeled with a stability. Here are my crude definitions of the stabilities:
Stable means you can almost certainly expect this feature to be in Paradoc pretty much as-is, but we reserve the possibility of adding/changing behavior in cases it previously did not cover, in ways that might technically not be backwards-compatible, or of changing the long expository identifier alias.
Beta means you can probably expect this to be in Paradoc as-is, but should also be prepared for it to be renamed or have its behavior changed. Or, there may be known bugs/design issues/TODOs in its implementation, or it may not have been tested as thoroughly as a stable feature.
Alpha means this is likely to be in Paradoc, but its name or some aspects of its behavior are decidedly not final. It may be replaced with something only spiritually similar.
For unstable features, all bets are off...
Of course, until we hit version 1.0, nothing should be considered absolutely fixed; if I have a good reason I will still change stable built-ins.
The ids of elements on this page should be considered unstable, so permalinks to this page should be considered unstable as well.
A brief, incomplete categorized list of built-ins and trailers, useful for golf, and related golf tips.
@, but all permutations of the top three elements of the stack are accessible in one or two characters. In addition, the trailers _a, _d, _k, _q, _u can often reduce or eliminate the need for stack manipulation.
_h, _k, _m+, -, ¯, ±, *, /, ÷, %, ‰
(, ), ‹ or <i, =i, › or >i, «, », L, M, U, ×, ½, ¼, ¾, ², ³, Si
&, |, ^, <s, >s, ~<, =, >,
<a, =a, >a,
<e, >e,
<m or Õ, >m or Ã
=c or ˜
ˆ or *p, _p, _r, Ln, Lg, Lt#, G, Lcm, ¡ or !p, ¿ or Ss, (p, )p, Bc, Et, Fb, Fc, Ff, Js, ¶ or Pp or +p, Ê or Ev, Î, Ô or Od, Û or -p, +o, -o[, ], ¬, integer_a, †, ‡, °,, D, J, Ð, Tl or ¨, To or …. Note that many built-ins and trailers implicitly convert numbers to the half-open ranges ending at them, which can be taken advantage of with e.g. +_v and +_y. 3 5 +v just gives [3 4 5 6 7].L=, ‹, ›<, >, « or (s, » or )s, ½, ¼, ¾(, )_r. Common folds include Š, Þ, Œ or <r, Æ or >r+, -, &, |, ^, *$, U, /, %, G, W, ™ or Tt<h, =h, >h, $p, <p, =p, >p~!, ?, &, |, &p, |p.SPACE_f works.U or Â.Ê._,
_a,
_b,
_d,
_k,
_q,
_u
*, /, _e, _x.
Note that this is often also "reduce with initial value".%, _m, _o, _w.
Note that all elements on the shadow stack are collected into the list, so you can use this to flatmap. Most simply, ~_m flattens a sequence of sequences once.+, -, ,, J, _fR, _r‰, _z, _ž_v, _y=, ^, _g (?)<, >X, Y, Z etc.) is very useful.
V.
For output you can use O and P or string trailers _o and _p.
= indexes or accesses hoards. Many built-ins will
convert hoards to lists (e.g. you can _map or _each a
hoard, take its Array_min or Array_max...).H and • are two built-in empty hoards. If you need more
somehow in convenient variables, Ah, Bh, Ch, and
Dh can produce them cheaply.Dc._a, _b, _p, _q._u. Note that the hoard automatically becomes a dictionary if the index is out of bounds, so that we can make empty lists automatically become dictionaries if used as such._u, _d. In special cases _m can be quite useful._g, _h, _z._o to add things, _d to delete things, and _z to check things._Stability: stable
Aliases:
_reluctant
Make this block reluctant: push it instead of executing it.
_aStability: alpha
Aliases:
_anti
Swap the top two elements of the stack before running this block. Makes the result reluctant.
_allStability: alpha
Aliases:
_â
Apply this block to each element of a list (coerces numbers to ranges); push whether at least one result is truthy.
_antiStability: alpha
Aliases:
_a
Swap the top two elements of the stack before running this block. Makes the result reluctant.
_anyStability: alpha
Apply this block to each element of a list (coerces numbers to ranges); push whether at least one result is truthy.
_autozipStability: beta
Execute this block once for each adjacent pair of elements from a list (coerces numbers to ranges). Both elements are pushed onto the stack.
_azStability: beta
Execute this block once for each adjacent pair of elements from a list (coerces numbers to ranges). Both elements are pushed onto the stack.
_bStability: stable
Aliases:
_bind
Right now, pop the top element of this stack; before each time this block is to be executed, push it. Makes the result reluctant.
_bindStability: stable
Aliases:
_b
Right now, pop the top element of this stack; before each time this block is to be executed, push it. Makes the result reluctant.
_bindmapStability: beta
Aliases:
_vectorize, _v
Pop the top element of the stack. Then, apply this block to each element of the next element of the stack (coerces numbers to ranges), pushing that top element before each application; collect the results into a new list.
Basically a _bind followed by a _map;
you can imagine it as vectorizing an operator if the top element of
the stack is a scalar and the one beneath it is a sequence, hence
the single-letter name. But, for the purposes of attaching further
trailers, note that it isn't as eager as bind in popping the top
element immediately.
[1 2 3] 100+v => [101 102 103]
Below is an example where +bm would not work, as the bind would already have bound the [100 200] rather than only bind anything inside the zip.
[[1 2][3 4]] [100 200] +vz => [[101 102][203 204]]
_boundaryStability: unstable
Aliases:
_ß
Run this block, but catch any exception and push its Python traceback, or an empty list if nothing happens. Does not catch breaks, continues, or KeyboardInterrupts (?) (but does catch exits).
_countStability: alpha
Aliases:
_ç
Apply this block to each element of a list (coerces numbers to ranges); push the number of truthy results.
_countdistinctStability: unstable
Aliases:
_ð
Apply this block to each element of a list (coerces numbers to ranges); push the number of distinct elements that gave truthy results.
_countnotStability: unstable
Apply this block to each element of a list (coerces numbers to ranges); push the number of falsy results.
_dStability: beta
Aliases:
_double
Apply this block in a bracketed shadow, then apply it again on what's underneath. In essence, applies this block to two disjoint sets of arguments on the stack.
1 8 )d => 2 9 1 2 8 9 +d => 3 17
_deepmapStability: alpha
Apply this block to each element of a possibly multi-level list (coerces numbers to ranges), as deeply as possible; collect the results into a new list with the same shape. Mnemonic: walk, as in traversing the entire structure; or upside-down "deeper" m.
_doubleStability: beta
Aliases:
_d
Apply this block in a bracketed shadow, then apply it again on what's underneath. In essence, applies this block to two disjoint sets of arguments on the stack.
1 8 )d => 2 9 1 2 8 9 +d => 3 17
_eStability: stable
Aliases:
_each
Apply this block to each element of a list (coerces numbers
to ranges). Compare _xloop.
_eachStability: stable
Aliases:
_e
Apply this block to each element of a list (coerces numbers
to ranges). Compare _xloop.
_enumapStability: alpha
Aliases:
_ë
Apply this block to each index and element of a list (coerces numbers to ranges); collect the results into a new list.
_existsStability: alpha
Apply this block to each element of a list (coerces numbers to ranges); push whether at least one result is truthy.
_fStability: stable
Apply this block to each element of a list (coerces numbers to ranges) and filter elements for which the block gives a truthy result.
_filterStability: stable
Apply this block to each element of a list (coerces numbers to ranges) and filter elements for which the block gives a truthy result.
_foldStability: beta
Combine all elements in a list into one by repeatedly applying a binary block (coerces numbers to 1-indexed ranges), and push the final element.
[10 20 30] +r => 60
_gStability: beta
Aliases:
_get
Find the first element of the list where this block gives a truthy result (coerces numbers to ranges).
_getStability: beta
Aliases:
_g
Find the first element of the list where this block gives a truthy result (coerces numbers to ranges).
_hStability: unstable
Aliases:
_high
Find the last index of the list where this block gives a truthy result (coerces numbers to ranges).
_highStability: unstable
Aliases:
_h
Find the last index of the list where this block gives a truthy result (coerces numbers to ranges).
_iStability: unstable
Aliases:
_index
Find the first index of the list where this block gives a truthy result (coerces numbers to ranges).
_indexStability: unstable
Aliases:
_i
Find the first index of the list where this block gives a truthy result (coerces numbers to ranges).
_jStability: unstable
Aliases:
_reject
Apply this block to each element of a list (coerces numbers to ranges) and filter elements for which the block gives a falsy result.
_kStability: stable
Aliases:
_keep
Execute this block in a preservation-shadow, so that any elements it pops aren't actually popped from the stack (so, "keep" those elements around).
Compare _keepunder.
10 Uk => 10 1 5 6 +k => 5 6 11
_keepStability: stable
Aliases:
_k
Execute this block in a preservation-shadow, so that any elements it pops aren't actually popped from the stack (so, "keep" those elements around).
Compare _keepunder.
10 Uk => 10 1 5 6 +k => 5 6 11
_keepunderStability: stable
Aliases:
_q
Execute this block in a preservation-shadow, so that any elements it pops aren't actually popped from the stack. Then push its results underneath elements it thinks were popped.
Compare _keep.
Mnemonic: "q" and "k" are phonetically similar and "q" is usually followed by a "u".
10 Uq => 1 10 5 6 +q => 11 5 6
_lStability: unstable
Aliases:
_last
Find the last index of the list where this block gives a truthy result (coerces numbers to ranges).
_lastStability: unstable
Aliases:
_l
Find the last index of the list where this block gives a truthy result (coerces numbers to ranges).
_loopStability: alpha
Loop this block forever (until an error is thrown).
_loopzipStability: alpha
Aliases:
_ö
Execute this block once for each corresponding pair of elements from two lists (coerces numbers to ranges). Both elements are pushed onto the stack. Collect the results into a list, which has the same length as the longer of the arguments; if one list is shorter, that list's elements are cycled until it is the same length as the longer list.
_mStability: stable
Aliases:
_map
Apply this block to each element of a list (coerces numbers to ranges); collect the results into a new list.
_mapStability: stable
Aliases:
_m
Apply this block to each element of a list (coerces numbers to ranges); collect the results into a new list.
_mapbindStability: beta
Aliases:
_y
Pop the second-to-top element of the stack. Then, apply this block to each element of the top element of the stack (coerces numbers to ranges), pushing what was the second-to-top element underneath the top element before each application; collect the results into a new list.
Sort of a reversed _bindmap. Mnemonic: y looks like a
modified v, for vectorize.
_mapproductStability: alpha
Apply this block to each element of a list (coerces numbers to ranges); take the deep product of the results.
_mapsumStability: alpha
Apply this block to each element of a list (coerces numbers to ranges); deeply sum the results.
_maxStability: alpha
Aliases:
_æ
Apply this block to each element of a list and return the element for which the block's result is maximum.
_minStability: alpha
Aliases:
_œ
Apply this block to each element of a list and return the element for which the block's result is minimum.
_noneStability: alpha
Aliases:
_ô
Apply this block to each element of a list (coerces numbers to ranges); push whether all results are falsy.
_oStability: unstable
Aliases:
_onemap
Apply this block to each element of a list (coerces numbers to 1-indexed ranges); collect the results into a new list.
_onemapStability: unstable
Aliases:
_o
Apply this block to each element of a list (coerces numbers to 1-indexed ranges); collect the results into a new list.
_orgStability: alpha
Apply this block to each element of a list (coerces numbers to ranges), and then organize the elements into groups based on which ones yield the same block outputs.
_organizeStability: alpha
Apply this block to each element of a list (coerces numbers to ranges), and then organize the elements into groups based on which ones yield the same block outputs.
_prodStability: alpha
Aliases:
_mapproduct, _product, _þ
Apply this block to each element of a list (coerces numbers to ranges); take the deep product of the results.
_productStability: alpha
Aliases:
_mapproduct, _prod, _þ
Apply this block to each element of a list (coerces numbers to ranges); take the deep product of the results.
_qStability: stable
Aliases:
_keepunder
Execute this block in a preservation-shadow, so that any elements it pops aren't actually popped from the stack. Then push its results underneath elements it thinks were popped.
Compare _keep.
Mnemonic: "q" and "k" are phonetically similar and "q" is usually followed by a "u".
10 Uq => 1 10 5 6 +q => 11 5 6
_rStability: beta
Combine all elements in a list into one by repeatedly applying a binary block (coerces numbers to 1-indexed ranges), and push the final element.
[10 20 30] +r => 60
_reduceStability: beta
Combine all elements in a list into one by repeatedly applying a binary block (coerces numbers to 1-indexed ranges), and push the final element.
[10 20 30] +r => 60
_rejectStability: unstable
Aliases:
_j
Apply this block to each element of a list (coerces numbers to ranges) and filter elements for which the block gives a falsy result.
_reluctantStability: stable
Aliases:
_
Make this block reluctant: push it instead of executing it.
_sStability: alpha
Aliases:
_scan
Combine all elements in a list into one by repeatedly applying a binary block (coerces numbers to 1-indexed ranges), and push the list of all intermediate results.
[10 20 30] +s => [10 30 60] [10 20 30] -s => [10 -10 -40] [10 20 30] -as => [10 10 20]
_scanStability: alpha
Aliases:
_s
Combine all elements in a list into one by repeatedly applying a binary block (coerces numbers to 1-indexed ranges), and push the list of all intermediate results.
[10 20 30] +s => [10 30 60] [10 20 30] -s => [10 -10 -40] [10 20 30] -as => [10 10 20]
_selectStability: stable
Apply this block to each element of a list (coerces numbers to ranges) and filter elements for which the block gives a truthy result.
_sumStability: alpha
Apply this block to each element of a list (coerces numbers to ranges); deeply sum the results.
_uStability: stable
Aliases:
_under
Execute this block underneath the top element. That is, before executing this block, pop the top element, and after executing it, push it back.
5 10 Uu => 1 10 1 5 9 +u => 6 9
_underStability: stable
Aliases:
_u
Execute this block underneath the top element. That is, before executing this block, pop the top element, and after executing it, push it back.
5 10 Uu => 1 10 1 5 9 +u => 6 9
_unemapStability: unstable
Aliases:
_ü
Apply this block to each element and index of a list (coerces numbers to ranges); collect the results into a new list.
_vStability: beta
Aliases:
_vectorize, _bindmap
Pop the top element of the stack. Then, apply this block to each element of the next element of the stack (coerces numbers to ranges), pushing that top element before each application; collect the results into a new list.
Basically a _bind followed by a _map;
you can imagine it as vectorizing an operator if the top element of
the stack is a scalar and the one beneath it is a sequence, hence
the single-letter name. But, for the purposes of attaching further
trailers, note that it isn't as eager as bind in popping the top
element immediately.
[1 2 3] 100+v => [101 102 103]
Below is an example where +bm would not work, as the bind would already have bound the [100 200] rather than only bind anything inside the zip.
[[1 2][3 4]] [100 200] +vz => [[101 102][203 204]]
_vectorizeStability: beta
Pop the top element of the stack. Then, apply this block to each element of the next element of the stack (coerces numbers to ranges), pushing that top element before each application; collect the results into a new list.
Basically a _bind followed by a _map;
you can imagine it as vectorizing an operator if the top element of
the stack is a scalar and the one beneath it is a sequence, hence
the single-letter name. But, for the purposes of attaching further
trailers, note that it isn't as eager as bind in popping the top
element immediately.
[1 2 3] 100+v => [101 102 103]
Below is an example where +bm would not work, as the bind would already have bound the [100 200] rather than only bind anything inside the zip.
[[1 2][3 4]] [100 200] +vz => [[101 102][203 204]]
_wStability: alpha
Apply this block to each element of a possibly multi-level list (coerces numbers to ranges), as deeply as possible; collect the results into a new list with the same shape. Mnemonic: walk, as in traversing the entire structure; or upside-down "deeper" m.
_walkStability: alpha
Apply this block to each element of a possibly multi-level list (coerces numbers to ranges), as deeply as possible; collect the results into a new list with the same shape. Mnemonic: walk, as in traversing the entire structure; or upside-down "deeper" m.
_xStability: stable
Aliases:
_xloop
Execute this block once for each element of a list (coerces
numbers to ranges). Unlike _each, the element is not
pushed onto the stack, but is put into the X-stack and can be
accessed through X.
See also *.
_xloopStability: stable
Aliases:
_x
Execute this block once for each element of a list (coerces
numbers to ranges). Unlike _each, the element is not
pushed onto the stack, but is put into the X-stack and can be
accessed through X.
See also *.
_yStability: beta
Aliases:
_mapbind
Pop the second-to-top element of the stack. Then, apply this block to each element of the top element of the stack (coerces numbers to ranges), pushing what was the second-to-top element underneath the top element before each application; collect the results into a new list.
Sort of a reversed _bindmap. Mnemonic: y looks like a
modified v, for vectorize.
_zStability: beta
Aliases:
_zip
Execute this block once for each corresponding pair of elements from two lists (coerces numbers to ranges). Both elements are pushed onto the stack. Collect the results into a list, which has the same length as the shorter of the arguments; if one list is longer, its extra elements are ignored.
_zipStability: beta
Aliases:
_z
Execute this block once for each corresponding pair of elements from two lists (coerces numbers to ranges). Both elements are pushed onto the stack. Collect the results into a list, which has the same length as the shorter of the arguments; if one list is longer, its extra elements are ignored.
_ziplongestStability: beta
Aliases:
_ž
Execute this block once for each corresponding pair of elements from two lists (coerces numbers to ranges). Both elements are pushed onto the stack. Collect the results into a list, which has the same length as the longer of the arguments; if one list is shorter, the other list's extra elements are put verbatim into the list.
_ßStability: unstable
Aliases:
_boundary
Run this block, but catch any exception and push its Python traceback, or an empty list if nothing happens. Does not catch breaks, continues, or KeyboardInterrupts (?) (but does catch exits).
_âStability: alpha
Aliases:
_all
Apply this block to each element of a list (coerces numbers to ranges); push whether at least one result is truthy.
_äStability: beta
Execute this block once for each adjacent pair of elements from a list (coerces numbers to ranges). Both elements are pushed onto the stack.
_æStability: alpha
Aliases:
_max
Apply this block to each element of a list and return the element for which the block's result is maximum.
_çStability: alpha
Aliases:
_count
Apply this block to each element of a list (coerces numbers to ranges); push the number of truthy results.
_êStability: alpha
Apply this block to each element of a list (coerces numbers to ranges); push whether at least one result is truthy.
_ëStability: alpha
Aliases:
_enumap
Apply this block to each index and element of a list (coerces numbers to ranges); collect the results into a new list.
_ðStability: unstable
Aliases:
_countdistinct
Apply this block to each element of a list (coerces numbers to ranges); push the number of distinct elements that gave truthy results.
_ñStability: unstable
Apply this block to each element of a list (coerces numbers to ranges); push the number of falsy results.
_ôStability: alpha
Aliases:
_none
Apply this block to each element of a list (coerces numbers to ranges); push whether all results are falsy.
_öStability: alpha
Aliases:
_loopzip
Execute this block once for each corresponding pair of elements from two lists (coerces numbers to ranges). Both elements are pushed onto the stack. Collect the results into a list, which has the same length as the longer of the arguments; if one list is shorter, that list's elements are cycled until it is the same length as the longer list.
_øStability: alpha
Apply this block to each element of a list (coerces numbers to ranges), and then organize the elements into groups based on which ones yield the same block outputs.
_üStability: unstable
Aliases:
_unemap
Apply this block to each element and index of a list (coerces numbers to ranges); collect the results into a new list.
_þStability: alpha
Aliases:
_mapproduct, _product, _prod
Apply this block to each element of a list (coerces numbers to ranges); take the deep product of the results.
_œStability: alpha
Aliases:
_min
Apply this block to each element of a list and return the element for which the block's result is minimum.
_šStability: alpha
Apply this block to each element of a list (coerces numbers to ranges); deeply sum the results.
_žStability: beta
Aliases:
_ziplongest
Execute this block once for each corresponding pair of elements from two lists (coerces numbers to ranges). Both elements are pushed onto the stack. Collect the results into a list, which has the same length as the longer of the arguments; if one list is shorter, the other list's extra elements are put verbatim into the list.
_ƒStability: unstable
Apply this block to each element of a list (coerces numbers to ranges); push the number of falsy results.
_Stability: alpha
Aliases:
_reluctant
Convert to a reluctant block that pushes this string.
_debugStability: beta
Print debugging information about the contents of the stack.
_fStability: alpha
Aliases:
_format
Formats elements on the stack with Python % formatting. If no % sign is in the string, prepends a %.
_formatStability: alpha
Aliases:
_f
Formats elements on the stack with Python % formatting. If no % sign is in the string, prepends a %.
_iStability: alpha
Aliases:
_interpolate
Interpolate elements on the stack into % signs in this string.
_iftrueStability: unstable
Aliases:
_t
Pop an element; push this string if it's truthy, and an empty string if not.
_interoutputStability: alpha
Aliases:
_o
Interpolate elements on the stack into % signs in this string, then outputs the result.
_interpolateStability: alpha
Aliases:
_i
Interpolate elements on the stack into % signs in this string.
_interprintStability: alpha
Aliases:
_p
Interpolate elements on the stack into % signs in this string, then outputs the result followed by an output record separator.
_oStability: alpha
Aliases:
_interoutput
Interpolate elements on the stack into % signs in this string, then outputs the result.
_pStability: alpha
Aliases:
_interprint
Interpolate elements on the stack into % signs in this string, then outputs the result followed by an output record separator.
_reluctantStability: alpha
Aliases:
_
Convert to a reluctant block that pushes this string.
_tStability: unstable
Aliases:
_iftrue
Pop an element; push this string if it's truthy, and an empty string if not.
_Stability: alpha
Aliases:
_reluctant
Convert to a reluctant block that pushes this number.
_aStability: beta
Aliases:
_array
Pop some number of elements and push them back in a new array.
_arrayStability: beta
Aliases:
_a
Pop some number of elements and push them back in a new array.
_bStability: unstable
Aliases:
_bits
Convert to list of bits.
_bitsStability: unstable
Aliases:
_b
Convert to list of bits.
_dStability: unstable
Aliases:
_digits
Convert to list of digits.
_deleteStability: unstable
Aliases:
_x
Delete the nth element of the stack (zero-indexed, so the element below n other elements). Mnemonic: ??? x is like crossing something out, but we really don't have any similar mnemonics right now.
_digitsStability: unstable
Aliases:
_d
Convert to list of digits.
_fStability: alpha
Aliases:
_force
Pop some number of elements and push them back immediately. Generally a no-op except in that it may force input/stack triggers to occur and will affect how shadow stacks behave. Usually used for debugging.
_forceStability: alpha
Aliases:
_f
Pop some number of elements and push them back immediately. Generally a no-op except in that it may force input/stack triggers to occur and will affect how shadow stacks behave. Usually used for debugging.
_gStability: unstable
Aliases:
_get
Index into a sequence.
_getStability: unstable
Aliases:
_g
Index into a sequence.
_hStability: stable
Aliases:
_hundred
Multiply by a hundred.
_hundredStability: stable
Aliases:
_h
Multiply by a hundred.
_iStability: unstable
Aliases:
_in
Move the top element of the stack to position n (zero-indexed, so below n other elements.)
_imagStability: unstable
Aliases:
_j
Imaginary number.
_inStability: unstable
Aliases:
_i
Move the top element of the stack to position n (zero-indexed, so below n other elements.)
_jStability: unstable
Aliases:
_imag
Imaginary number.
_kStability: stable
Aliases:
_thousand
Multiply by a thousand.
_lStability: unstable
Aliases:
_last
Index from the end of a sequence.
_lastStability: unstable
Aliases:
_l
Index from the end of a sequence.
_mStability: stable
Aliases:
_minus
Negate.
_minusStability: stable
Aliases:
_m
Negate.
_oStability: unstable
Aliases:
_out
Move the nth element of the stack (zero-indexed, so the element below n other elements) to the top.
_outStability: unstable
Aliases:
_o
Move the nth element of the stack (zero-indexed, so the element below n other elements) to the top.
_pStability: beta
Aliases:
_power
Raise something to this power.
_powerStability: beta
Aliases:
_p
Raise something to this power.
_pushbitsStability: unstable
Aliases:
_ß
Interpret this number in binary and push the bits of this number (directly onto the stack in order).
_pushdigitsStability: unstable
Aliases:
_ð
Push the digits of this number (directly onto the stack in order).
_qStability: unstable
Aliases:
_quarter
Let X be this number over four. For numbers, multiply by X. For lists, take the first floor(X) elements. For blocks, run with probability X.
_quarterStability: unstable
Aliases:
_q
Let X be this number over four. For numbers, multiply by X. For lists, take the first floor(X) elements. For blocks, run with probability X.
_rStability: alpha
Aliases:
_root
Take the nth root.
_reluctantStability: alpha
Aliases:
_
Convert to a reluctant block that pushes this number.
_rootStability: alpha
Aliases:
_r
Take the nth root.
_thousandStability: stable
Aliases:
_k
Multiply by a thousand.
_uStability: alpha
Aliases:
_under
Push under the top element.
_underStability: alpha
Aliases:
_u
Push under the top element.
_xStability: unstable
Aliases:
_delete
Delete the nth element of the stack (zero-indexed, so the element below n other elements). Mnemonic: ??? x is like crossing something out, but we really don't have any similar mnemonics right now.
_zStability: beta
Aliases:
_zip
Pop some number of elements and zip them together.
_zipStability: beta
Aliases:
_z
Pop some number of elements and zip them together.
_ßStability: unstable
Aliases:
_pushbits
Interpret this number in binary and push the bits of this number (directly onto the stack in order).
_àStability: unstable
Subtract this constant. Deeply vectorizes.
NOTE: This trailer also works on capital letters, interpreted as base-36 constants (A = 10 until Z = 35). This is not a syntax special case; essentially you can imagine there's a family of built-ins with the right names.
_áStability: unstable
Add this constant. Deeply vectorizes.
NOTE: This trailer also works on capital letters, interpreted as base-36 constants (A = 10 until Z = 35). This is not a syntax special case; essentially you can imagine there's a family of built-ins with the right names.
_èStability: unstable
Squares this constant.
NOTE: This trailer also works on capital letters, interpreted as base-36 constants (A = 10 until Z = 35). This is not a syntax special case; essentially you can imagine there's a family of built-ins with the right names.
_éStability: unstable
Takes 2 to the power of this constant.
NOTE: This trailer also works on capital letters, interpreted as base-36 constants (A = 10 until Z = 35). This is not a syntax special case; essentially you can imagine there's a family of built-ins with the right names.
_ìStability: unstable
Negates this constant.
NOTE: This trailer also works on capital letters, interpreted as base-36 constants (A = 10 until Z = 35). This is not a syntax special case; essentially you can imagine there's a family of built-ins with the right names.
_íStability: unstable
Inverts this constant.
NOTE: This trailer also works on capital letters, interpreted as base-36 constants (A = 10 until Z = 35). This is not a syntax special case; essentially you can imagine there's a family of built-ins with the right names.
_ðStability: unstable
Aliases:
_pushdigits
Push the digits of this number (directly onto the stack in order).
_òStability: unstable
Divide by this constant. Deeply vectorizes.
NOTE: This trailer also works on capital letters, interpreted as base-36 constants (A = 10 until Z = 35). This is not a syntax special case; essentially you can imagine there's a family of built-ins with the right names.
_óStability: unstable
Multiply by this constant. Deeply vectorizes.
NOTE: This trailer also works on capital letters, interpreted as base-36 constants (A = 10 until Z = 35). This is not a syntax special case; essentially you can imagine there's a family of built-ins with the right names.
_ùStability: unstable
Not implemented yet.
NOTE: This trailer also works on capital letters, interpreted as base-36 constants (A = 10 until Z = 35). This is not a syntax special case; essentially you can imagine there's a family of built-ins with the right names.
_úStability: unstable
Mod by this constant. Deeply vectorizes.
NOTE: This trailer also works on capital letters, interpreted as base-36 constants (A = 10 until Z = 35). This is not a syntax special case; essentially you can imagine there's a family of built-ins with the right names.
_ýStability: unstable
Takes 10 to the power of this constant.
NOTE: This trailer also works on capital letters, interpreted as base-36 constants (A = 10 until Z = 35). This is not a syntax special case; essentially you can imagine there's a family of built-ins with the right names.
_Stability: alpha
Aliases:
_reluctant
Convert to a reluctant block that pushes this number.
_hStability: alpha
Aliases:
_hundred
Multiply by a hundred.
_hundredStability: alpha
Aliases:
_h
Multiply by a hundred.
_kStability: alpha
Aliases:
_thousand
Multiply by a thousand.
_mStability: stable
Aliases:
_minus
Negate.
_minusStability: stable
Aliases:
_m
Negate.
_reluctantStability: alpha
Aliases:
_
Convert to a reluctant block that pushes this number.
_thousandStability: alpha
Aliases:
_k
Multiply by a thousand.
_aStability: alpha
Aliases:
_append
Append (to the right).
_appendStability: alpha
Aliases:
_a
Append (to the right).
_appendbackStability: alpha
Aliases:
_appendleft, _b
Append to the left, aka back.
_appendleftStability: alpha
Aliases:
_appendback, _b
Append to the left, aka back.
_bStability: alpha
Aliases:
_appendleft, _appendback
Append to the left, aka back.
_cStability: alpha
Aliases:
_copy
Copy into a new Hoard.
_copyStability: alpha
Aliases:
_c
Copy into a new Hoard.
_dStability: alpha
Aliases:
_delete
Delete a key
_deleteStability: alpha
Aliases:
_d
Delete a key
_ejectStability: unstable
Aliases:
_j
Push a list copy of the hoard, then clear the hoard.
_extendStability: unstable
Aliases:
_x
Extend (with a sequence, to the right).
_gStability: alpha
Aliases:
_get
Get a key with a default value if the key is not found
_getStability: alpha
Aliases:
_g
Get a key with a default value if the key is not found
_getzeroStability: unstable
Aliases:
_z
Get value at a key with 0 as default is the key is not found
_hStability: unstable
Aliases:
_haskey
Test if a key exists
_haskeyStability: unstable
Aliases:
_h
Test if a key exists
_jStability: unstable
Aliases:
_eject
Push a list copy of the hoard, then clear the hoard.
_kStability: unstable
Get list of keys
_lStability: alpha
Aliases:
_list
To list
_listStability: alpha
Aliases:
_l
To list
_mStability: unstable
Aliases:
_modify
Modify at an index or key: change the value at that index or key to the result of running that value through incrementing an integer or running a block. If no value existed there previously, 0 is assumed. (In the future we may handle other types of values differently.)
_modifyStability: unstable
Aliases:
_m
Modify at an index or key: change the value at that index or key to the result of running that value through incrementing an integer or running a block. If no value existed there previously, 0 is assumed. (In the future we may handle other types of values differently.)
_oStability: unstable
Aliases:
_updateone
Put 1 at a key
_pStability: alpha
Aliases:
_pop
Pop (from the right).
_popStability: alpha
Aliases:
_p
Pop (from the right).
_popleftStability: alpha
Aliases:
_q
Pop from the left. Dequeue, perhaps.
_qStability: alpha
Aliases:
_popleft
Pop from the left. Dequeue, perhaps.
_rStability: alpha
Aliases:
_replace
Completely replace data.
_replaceStability: alpha
Aliases:
_r
Completely replace data.
_tStability: unstable
Aliases:
_translate
Translate a list through looking up keys, with default 0 (coerces numbers to ranges).
_translateStability: unstable
Aliases:
_t
Translate a list through looking up keys, with default 0 (coerces numbers to ranges).
_uStability: alpha
Aliases:
_update
Update at an index or key.
_updateStability: alpha
Aliases:
_u
Update at an index or key.
_updateoneStability: unstable
Aliases:
_o
Put 1 at a key
_xStability: unstable
Aliases:
_extend
Extend (with a sequence, to the right).
_zStability: unstable
Aliases:
_getzero
Get value at a key with 0 as default is the key is not found
^@Stability: unstable
^AStability: unstable
Integer constant with value 1
TABStability: stable
Aliases:
Nop, , SPACE, NEWLINERETURN
Do nothing.
NEWLINEStability: stable
Aliases:
Nop, , SPACE, TABRETURN
Do nothing.
NEWLINEbStability: alpha
Aliases:
Line_split, Lines, Line_break, \nb
Split by a single newline.
NEWLINEmStability: alpha
Aliases:
Map_on_lines, \nm
Map on lines: takes a block and a string, split the string into lines, map the block over the tokens, then join the tokens with a linebreak.
NEWLINEoStability: beta
Aliases:
Newline_output, \no
Output a newline.
NEWLINEpStability: beta
Aliases:
Newline_print, \np
Output a newline, followed by an output record separator.
NEWLINErStability: beta
Join with newlines
NEWLINExStability: alpha
Aliases:
Newline_repeat, \nx
RETURNStability: stable
Aliases:
Nop, , SPACE, TABNEWLINE
Do nothing.
^NStability: unstable
Aliases:
Ŋ
Unstable aliases for Line_join.
^PStability: unstable
Pop something, output to standard output followed by an
output record separator, then push it back. Pretty much just Print__keep.
SPACEStability: stable
Aliases:
Nop, , TAB, NEWLINERETURN
Do nothing.
SPACEbStability: alpha
Aliases:
Space_split, Space_break
Split by a single space. Note that this returns empty
strings between adjacent spaces, as well as at the start or end if
the string starts or ends with spaces, and it does not split by
other whitespace. Use Words if you don't want that.
SPACEmStability: alpha
Aliases:
Map_on_words
Map on words: takes a block and a string, split the string by spaces, map the block over the tokens, then join the tokens with a space.
SPACEoStability: beta
Aliases:
Space_output
Output a space.
SPACEqStability: alpha
Aliases:
Rectangularize_with_space
Rectangularize a matrix with spaces: append the space character as necessary to rows until the matrix is rectangular. Mnemonic: Q for Quadrangle.
SPACErStability: beta
Aliases:
Space_join
SPACEtStability: alpha
Aliases:
Transpose_fill_with_space
Transpose a matrix, or list of lists (or of strings), adding the space character as necessary until the matrix is rectangular.
SPACExStability: alpha
Aliases:
Space_repeat
!Stability: stable
Logical Not: 0 and empty lists/strings yield 1, everything else yields 0.
Or postcompose a logical NOT onto a block (not recursively though).
!jStability: unstable
Aliases:
Not_imaginary
Test if the imaginary part is zero. Deeply vectorizes.
!pStability: beta
Aliases:
Permutations_or_factorial, ¡
#Stability: beta
Aliases:
Count_maybe_factors
Count factor multiplicity, frequency, or number satisfying predicate. Mnemonic: number sign, as in you're counting the number of something
#pStability: alpha
Aliases:
Count_pairs
Given a sequence, return a list of pairs, each pair with a distinct element and the number of times it appears in the sequence.
#æStability: alpha
Aliases:
Most_frequent
Most frequently appearing element.
#œStability: alpha
Aliases:
Least_frequent
Least frequently appearing element.
$Stability: beta
Aliases:
Sort_or_stack_select
Sort or select from stack
$pStability: beta
Aliases:
Is_sorted
Test if sorted
%Stability: stable
Aliases:
Mod_or_slice_mod_or_split_nonempty_or_map
Modulus on numbers. On a sequence and number, slice elements at indices equal to 0 mod the number, just like Python s[::n] (negative numbers reverse the sequence). On two sequences, split the first sequence around occurrences of the second sequence, discarding empty tokens. Map on blocks and sequences (numbers coerce to ranges).
"tweedledee""e"% => ["tw" "dl" "d"]
%pStability: unstable
Aliases:
Divmod_or_zip, ‰
On integers, integer division and modulus. On two sequences
or a block and two sequences, Zip.
%âStability: unstable
Aliases:
Positive_biased_balanced_mod
Balanced mod: on a and b, returns the number that's equal to a mod b and as close to 0 as possible, preferring |b|/2 over -|b|/2.
%ûStability: unstable
Aliases:
Negative_biased_balanced_mod
Balanced mod: on a and b, returns the number that's equal to a mod b and as close to 0 as possible, preferring -|b|/2 over |b|/2.
&Stability: beta
Aliases:
Bin_and_or_intersection_or_if
Binary AND on numbers. Intersection on sequences. One-branch if on blocks.
&jStability: unstable
Aliases:
Pure_imaginary, ?j
Test if the real part is zero. Deeply vectorizes.
&pStability: beta
Aliases:
Boolean_and
Takes two arguments, leaves the first if the first is truthy and the second if the first is falsy.
(Stability: beta
Aliases:
Decr_or_uncons_or_modify_first
Decr or Uncons or
Modify_first.
(pStability: alpha
Aliases:
Prev_prime
Find the largest prime smaller than this.
(sStability: beta
Aliases:
Butlast
All but last of sequence
)Stability: beta
Aliases:
Incr_or_unsnoc_or_modify_last
Incr or Unsnoc or
Modify_last.
)pStability: alpha
Aliases:
Next_prime
Find the smallest prime larger than this.
)sStability: beta
Aliases:
Butfirst
All but first of sequence
*Stability: beta
Aliases:
Mul_or_xloop
Multiplication on numbers. Repetition on sequences with
numbers. "Flat" Cartesian product on two sequences (this returns a
single-level list of pairs, rather than a list of lists of pairs;
if you want the latter, see T). X-loop on blocks and
sequences, in which elements and corresponding indices are pushed
onto the X-stack, but not pushed onto the stack (numbers coerce to
ranges, so, if you don't use the variable X, it's just repeating a
block some number of times.)
See also _xloop.
3 {2*} 4* => 48
{X} 4* => 0 1 2 3
[2 3 5 7] {2X#} * => 4 8 32 128
*jStability: alpha
Multiply by the imaginary unit. Deeply vectorizes.
*nStability: unstable
Aliases:
King_neighbors
Return a list of almost-copies of the object, every variant obtainable by modifying each deep element by -1, 0, or 1, except for the original object itself.
*pStability: beta
On numbers, power/exponentiate. On a list and a number, exponentiate the list by making a list of all lists of that length composed of elements from the original list (possibly repeating).
*wStability: alpha
(Deep) product (coerces numbers to range!?).
+Stability: stable
Aliases:
Plus_or_filter_or_compose, Plus_or_filter
Addition on numbers. Concatenation on lists and strings (numbers coerce to single-element lists or to strings). Filter on block and list (numbers coerce to ranges). Compose on blocks.
+iStability: alpha
Aliases:
Plus_ints
Add two things after coercing both to integers.
+jStability: alpha
First number plus second number times the imaginary unit.
+lStability: unstable
Aliases:
Plus_lengths
Add two things after coercing both to ints or floats, sequences by taking their length.
+nStability: unstable
Aliases:
Orthogonal_neighbors
Return a list of almost-copies of the object, two per deep element, one with that deep element decreased by 1 and one with it increased by 1.
+oStability: alpha
Aliases:
Positive_or_zero
+pStability: beta
Aliases:
Positive
+wStability: beta
(Deep) sum (coerces numbers to range).
,Stability: beta
Aliases:
Range_enumerate_or_filter_indices
Range on numbers. Enumerate (zip with indices from 0) on sequences. On block and sequence, list indices at which block is true.
Compare Range_enumerate_one_or_reject_indices.
-Stability: stable
Aliases:
Minus_or_reject
Golf as:
-
Subtraction on numbers. Filter-not-in on lists and strings
(numbers coerce to single-element lists). Filter-not on block and
list (numbers coerce to ranges). See also Antiminus.
-cStability: unstable
Aliases:
Clamped_subtract
Subtraction clamped to zero, or saturating subtraction: the maximum of the subtraction or 0.
-iStability: unstable
Aliases:
Minus_ints
Subtract two things after coercing both to integers.
-jStability: alpha
First number minus second number times the imaginary unit.
-lStability: unstable
Aliases:
Minus_lengths
Subtract two things after coercing both to ints or floats, sequences by taking their length.
-oStability: alpha
Aliases:
Negative_or_zero
-pStability: beta
Aliases:
Negative
/Stability: stable
Aliases:
Div_or_split_or_each
Float division on numbers. On a sequence and number, split the sequence into chunks of size equal to the number, including leftovers if any. On two sequences, split the first sequence around occurrences of the second sequence. For-each on blocks and sequences (numbers coerce to ranges).
See also Intdiv_or_split_discard.
[1 2 3 4]2/ => [[1 2][3 4]] [1 2 3 4 5]2/ => [[1 2][3 4][5]] "tweedledee""e"% => ["tw" "" "dl" "d" "" ""]
/jStability: alpha
Divide by the imaginary unit; equivalently, multiply by -1j. Deeply vectorizes.
:Stability: stable
Aliases:
Dup
Duplicate the top element of the stack.
1 2 3 : => 1 2 3 3
:aStability: alpha
Aliases:
Is_array
Test if array (or range)
:bStability: alpha
Aliases:
Is_block
Test if block
:cStability: alpha
Aliases:
Is_char
Test if Char
:fStability: alpha
Aliases:
Is_float
Test if float
:hStability: alpha
Aliases:
Is_hoard
Test if hoard
:iStability: alpha
Aliases:
Is_int
Test if integer
:jStability: alpha
Aliases:
Is_complex
Test if complex
:nStability: alpha
Aliases:
Is_number
Test if number (char, int, float, complex)
:oStability: alpha
Aliases:
Dup_out
Duplicate the second element of the stack onto the top: a b -> a b a
1 2 3 :o => 1 2 3 2
:pStability: beta
Duplicate the top two elements of the stack: a b -> a b a b
1 2 3 :p => 1 2 3 2 3
:sStability: alpha
Aliases:
Is_string
Test if string
;Stability: stable
Aliases:
Pop
Pop the top element of the stack.
1 2 3; => 1 2
;aStability: unstable
Aliases:
Pop_around
Pop the first and third from the top elements of the stack,
named to be somewhat analogous to \a.
1 2 3;a => 2
;fStability: alpha
Aliases:
Pop_if_false
Look at the top element of the stack. Pop it if it's falsy.
;iStability: alpha
Aliases:
Pop_if
Pop the top element of the stack. Pop the second element if the first element was truthy.
;jStability: unstable
Aliases:
Imaginary_part
Imaginary part. Deeply vectorizes because why not. Mnemonic: deletes part of the complex number like ;. Keeps the imaginary part rather than deleting it because direct conversion to float, F, already computes the real part.
;nStability: alpha
Aliases:
Pop_if_not
Pop the top element of the stack. Pop the second element if the first element was falsy.
;oStability: unstable
Aliases:
Pop_out
Pop the third from the top element of the stack, named to
be somewhat analogous to \o.
1 2 3;o => 2 3
;pStability: unstable
Aliases:
Pop_second_pair
Pop the second and third from the top elements of the
stack. Not the first and second because that's
;_d.
1 2 3;p => 3
;sStability: beta
Aliases:
Pop_stack
;tStability: alpha
Aliases:
Pop_if_true
Look at the top element of the stack. Pop it if it's truthy.
<Stability: beta
Aliases:
Lt_or_slice
On two numbers, two strings, or two lists, compare if the first is less than the second. On a number and a sequence, slice elements with index less than the number, as Python s[:n]. On a sequence (numbers coerce to ranges) and a block, "take while", or return the longest prefix of elements that all satisfy the block.
<aStability: alpha
Aliases:
Lt_approx
Approximately less than; tolerance is given by Ep, epsilon
<cStability: unstable
Aliases:
Left_cycle
Left cycle a list or string by some number of elements, which are cut off the left and reattached to the right.
<eStability: beta
Aliases:
Leq_or_slice
Less than or equal to.
<elStability: unstable
Aliases:
Leq_length
Less than or equal to, after coercing two arguments to ints or floats, sequences by taking their length.
<fStability: unstable
Aliases:
Left_fill_with_spaces
Given a value and a length, convert the value to a string if necessary and left-pad it with spaces until at least the length.
<hStability: unstable
Aliases:
Has_prefix
Test if the first argument has a prefix equal to the second argument (numbers coerce to single-element lists; if at least one argument is a string, both coerce to strings).
<iStability: beta
Aliases:
Floor
Golf as:
‹
Round down to the nearest integer.
<lStability: unstable
Aliases:
Lt_length
Less than, after coercing two arguments to ints or floats, sequences by taking their length.
<mStability: beta
Minimum of two values, optionally by a block
<mwStability: unstable
Aliases:
Min_deep_vectorizing, Õw
Minimum of two values; deeply vectorizes.
<oStability: unstable
Aliases:
Left_cycle_one
Left cycle a list or string Once: move the first element to the last.
<pStability: beta
Aliases:
Is_strictly_increasing
Test if strictly increasing
<rStability: beta
Minimum of array, optionally by a block (numbers will coerce to ranges if you supply a block). Mnemonic: it's like reducing by minimum of two values.
<rsStability: alpha
Aliases:
Array_minima, Œs
Minima of array, optionally by a block (numbers will coerce to ranges if you supply a block).
<sStability: alpha
Aliases:
Left_shift_or_slices
Left_shift on numbers, Left_slices on a
sequence
=Stability: beta
Aliases:
Equal_or_index_or_find
On two numbers, two strings, or two lists, compare for equality. On a number and a sequence, index into the sequence. On a block and a sequence (numbers coerce to ranges), find the first element satisfying the block.
=aStability: alpha
Aliases:
Eq_approx
Approximately equal than; tolerance is given by Ep, epsilon
=cStability: unstable
Aliases:
Index_cyclically
Index into a list cyclically, by taking the index mod the length of the list.
=fStability: unstable
Aliases:
Center_fill_with_spaces
Given a value and a length, convert the value to a string if necessary and pad it with equally many spaces on either side until at least the length.
=gStability: unstable
Aliases:
First_duplicate
Find the first element that appears a second time in a sequence.
=hStability: unstable
Aliases:
Has_infix
Test if the first argument has a substring equal to the second argument (numbers coerce to single-element lists; if at least one argument is a string, both coerce to strings).
=iStability: alpha
Aliases:
Round
Round to the nearest integer; follows Python's rules.
=lStability: unstable
Aliases:
Eq_length
Equal to, after coercing two arguments to ints or floats, sequences by taking their length.
=mStability: alpha
Aliases:
Median_of_three
Median of three values, optionally by a block
=pStability: beta
Aliases:
Identical
Golf as:
Î
=rStability: alpha
Aliases:
Array_median
Median of array
=sStability: unstable
Aliases:
All_slices, §
All slices of a sequence (numbers coerce to ranges).
>Stability: beta
Aliases:
Gt_or_slice
On two numbers, two strings, or two lists, compare if the first is greater than the second. On a number and a sequence, slice elements with index greater than or equal to the number, as Python s[n:]. On a sequence (numbers coerce to ranges) and a block, "drop while", or return the suffix starting with the first element that fails to satisfy the block.
>aStability: alpha
Aliases:
Gt_approx
Approximately greater than; tolerance is given by Ep, epsilon
>cStability: unstable
Aliases:
Right_cycle
Right cycle a list or string by some number of elements, which are cut off the right and reattached to the left.
>eStability: beta
Aliases:
Geq_or_slice
Greater than or equal to.
>elStability: unstable
Aliases:
Geq_length
Greater than or equal to, after coercing two arguments to ints or floats, sequences by taking their length.
>fStability: unstable
Aliases:
Right_fill_with_spaces
Given a value and a length, convert the value to a string if necessary and right-pad it with spaces until at least the length.
>hStability: unstable
Aliases:
Has_suffix
Test if the first argument has a suffix equal to the second argument (numbers coerce to single-element lists; if at least one argument is a string, both coerce to strings).
>iStability: beta
Aliases:
Ceiling
Golf as:
›
Round up to the nearest integer.
>lStability: unstable
Aliases:
Gt_length
Greater than, after coercing two arguments to ints or floats, sequences by taking their length.
>mStability: beta
Maximum of two values, optionally by a block
>mwStability: unstable
Aliases:
Max_deep_vectorizing, Ãw
Maximum of two values; deeply vectorizes.
>oStability: unstable
Aliases:
Right_cycle_one
Right cycle a list or string Once: move the last element to the first.
>pStability: beta
Aliases:
Is_strictly_decreasing
Test if strictly decreasing
>rStability: beta
Maximum of array, optionally by a block (numbers will coerce to ranges if you supply a block). Mnemonic: it's like reducing by maximum of two values.
>rsStability: alpha
Aliases:
Array_maxima, Æs
Maxima of array, optionally by a block (numbers will coerce to ranges if you supply a block).
>sStability: alpha
Aliases:
Right_shift_or_slices
Right_shift on numbers, Right_slices on
a sequence
?Stability: beta
Aliases:
If_else
If-else.
1 "True!" "False" ? => "True!"
?jStability: unstable
Aliases:
Pure_imaginary, &j
Test if the real part is zero. Deeply vectorizes.
@Stability: beta
Aliases:
Find_index
Inside a sequence (numbers coerce to ranges), find the first index of an element, a substring, or something satisfying a block. Mnemonic: finds where the element is AT.
AStability: stable
Utility constant: ten
Integer constant with value 10
AaStability: alpha
Alphabet
String constant with value 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
Above_zero_or_allStability: beta
Aliases:
Â
Above zero or All
AbsStability: stable
Golf as:
L
Absolute value of a number.
Abs_diffStability: stable
Absolute difference. Mnemonic: + is for "positive" and - is for "difference".
Abs_or_len_or_loopStability: alpha
Aliases:
L
Abs on numbers; Len on sequences; Loop on blocks.
AcStability: beta
Aliases:
Acos
AcosStability: beta
Aliases:
Ac
AdStability: stable
Absolute difference. Mnemonic: + is for "positive" and - is for "difference".
AeStability: alpha
Aliases:
All_and_exists
AhStability: alpha
Hoardify the A variable: delete all variables starting with A and set A to a new empty hoard.
AjStability: unstable
Aliases:
Complex_components_array
Real and imaginary part, as a list of two elements on the stack. Mnemonic: A for array as usual.
AlStability: beta
Aliases:
All
Golf as:
Â
AllStability: beta
Aliases:
Al
Golf as:
Â
All_and_existsStability: alpha
Aliases:
Ae
All_slicesStability: unstable
All slices of a sequence (numbers coerce to ranges).
AnStability: beta
Aliases:
Any
Golf as:
Ê
AntiminusStability: beta
Aliases:
¯
Reversed subtraction. Compare
Minus_or_reject.
AnyStability: beta
Aliases:
An
Golf as:
Ê
ApStability: beta
Aliases:
Is_alpha
Tests if characters are letters. Deeply vectorizes.
Array_maxStability: beta
Maximum of array, optionally by a block (numbers will coerce to ranges if you supply a block). Mnemonic: it's like reducing by maximum of two values.
Array_maximaStability: alpha
Maxima of array, optionally by a block (numbers will coerce to ranges if you supply a block).
Array_medianStability: alpha
Aliases:
=r
Median of array
Array_minStability: beta
Minimum of array, optionally by a block (numbers will coerce to ranges if you supply a block). Mnemonic: it's like reducing by minimum of two values.
Array_minimaStability: alpha
Minima of array, optionally by a block (numbers will coerce to ranges if you supply a block).
AsStability: beta
Aliases:
Asin
AsinStability: beta
Aliases:
As
Assign_bulletStability: alpha
Aliases:
·
Assign to the variable •
Assign_bullet_destructiveStability: alpha
Aliases:
–
Pop and assign to the variable •
AtStability: beta
Aliases:
Atan
AtanStability: beta
Aliases:
At
AutozipStability: alpha
Aliases:
Az
Collect the list of adjacent pairs of elements of a list (coerces numbers to ranges); or map a block across these pairs, which is equivalent to zipping the list with its own tail.
AvStability: alpha
Aliases:
Average
Average (deep).
AverageStability: alpha
Aliases:
Av
Average (deep).
AzStability: alpha
Aliases:
Autozip
Collect the list of adjacent pairs of elements of a list (coerces numbers to ranges); or map a block across these pairs, which is equivalent to zipping the list with its own tail.
BStability: beta
Aliases:
Base_or_product_map
Base or Product_map (mnemonic: Bi-map,
mapping over two things at once. Note that the result is a
single-level list of results; for a "table" or a list of lists, see
T.
BaseStability: beta
Golf as:
B
Base. On two numbers, converts the first to a list of digits in the radix of the second. On a list or a string and a number, interprets the sequence as digits (numbers if a list, digit characters if a string) in the radix of the number and converts to a number.
Base_or_product_mapStability: beta
Aliases:
B
Base or Product_map (mnemonic: Bi-map,
mapping over two things at once. Note that the result is a
single-level list of results; for a "table" or a list of lists, see
T.
BcStability: beta
Aliases:
Binomial_coefficient
Golf as:
Ç
BhStability: alpha
Hoardify the B variable: delete all variables starting with B and set B to a new empty hoard.
BimaskStability: alpha
Golf as:
¥
Bimask: Zip two sequences and push two filtered versions of the first sequence, one of elements where the corresponding elements of the second are falsy, and one of the remaining.
Bin_and_or_intersection_or_ifStability: beta
Aliases:
&
Binary AND on numbers. Intersection on sequences. One-branch if on blocks.
Bin_or_or_union_or_unlessStability: beta
Aliases:
|
Binary OR on numbers. Union on sequences. One-branch unless on blocks.
Bin_stringStability: beta
Aliases:
Bs
Converts numbers to their binary representation as a string. Deeply vectorizes.
Binomial_coefficientStability: beta
Aliases:
Bc
Golf as:
Ç
Boolean_andStability: beta
Aliases:
&p
Takes two arguments, leaves the first if the first is truthy and the second if the first is falsy.
Boolean_orStability: beta
Aliases:
|p
Takes two arguments, leaves the first if the first is falsy and the second if the first is truthy.
BreakStability: beta
Break out of the current loop.
BsStability: beta
Aliases:
Bin_string
Converts numbers to their binary representation as a string. Deeply vectorizes.
ButfirstStability: beta
Aliases:
)s
All but first of sequence
ButlastStability: beta
Aliases:
(s
All but last of sequence
CStability: alpha
Aliases:
To_char_or_peekloop
On a non-block value, To_char; on a block,
Peekdo. Mnemonic: "C" is right next to "D" and it's a
homophone of "see", which is a synonym of "peek".
CatStability: stable
Golf as:
+
Concatenate two lists (numbers coerce to single-element lists).
Cat_betweenStability: unstable
Aliases:
Cb
two copies of a with b between: a, b -> a + b + a. Numbers coerce to single-element lists.
Cat_flankStability: unstable
Aliases:
Cf
a with two copies of b flanking: a, b -> b + a + b. Numbers coerce to single-element lists.
CbStability: unstable
Aliases:
Cat_between
two copies of a with b between: a, b -> a + b + a. Numbers coerce to single-element lists.
CcStability: alpha
Aliases:
Csc
CeilingStability: beta
Aliases:
>i
Golf as:
›
Round up to the nearest integer.
Ceiling_or_lastStability: beta
Aliases:
›
Ceiling or Last of sequence or
Modify_last
Center_fill_with_spacesStability: unstable
Aliases:
=f
Given a value and a length, convert the value to a string if necessary and pad it with equally many spaces on either side until at least the length.
CfStability: unstable
Aliases:
Cat_flank
a with two copies of b flanking: a, b -> b + a + b. Numbers coerce to single-element lists.
ChStability: alpha
Hoardify the C variable: delete all variables starting with C and set C to a new empty hoard.
Clamped_subtractStability: unstable
Aliases:
-c
Subtraction clamped to zero, or saturating subtraction: the maximum of the subtraction or 0.
CoStability: alpha
Compare (-1, 0, or 1)
CompareStability: alpha
Compare (-1, 0, or 1)
Compl_or_eval_or_expandStability: beta
Aliases:
~
Bitwise complement of integers. Expand lists or strings onto the stack, pushing each element separately in order. Eval on a block.
Complement_parityStability: alpha
Aliases:
~p
Complex_componentsStability: unstable
Aliases:
~j
Real and imaginary part, as two elements on the stack. Mnemonic: Treating the complex number as a length-2 list, this expands it like ~.
Complex_components_arrayStability: unstable
Aliases:
Aj
Real and imaginary part, as a list of two elements on the stack. Mnemonic: A for array as usual.
ComposeStability: alpha
Golf as:
+
Compose two blocks together.
ConjugateStability: alpha
Aliases:
Mj
Negate the imaginary part. Deeply vectorizes.
ContinueStability: beta
Aliases:
Keep_going, K
Skip to the next iteration of the current loop.
CosStability: beta
Aliases:
Cs
CotStability: alpha
Aliases:
Ct
Count_maybe_factorsStability: beta
Aliases:
#
Count factor multiplicity, frequency, or number satisfying predicate. Mnemonic: number sign, as in you're counting the number of something
Count_pairsStability: alpha
Aliases:
#p
Given a sequence, return a list of pairs, each pair with a distinct element and the number of times it appears in the sequence.
CsStability: beta
Aliases:
Cos
CscStability: alpha
Aliases:
Cc
CtStability: alpha
Aliases:
Cot
CubeStability: beta
Aliases:
³
Cube a number, or compute the Cartesian product of three copies of a sequence.
DStability: beta
Aliases:
Reverse_or_doloop, Down_or_doloop
On a number of a sequence, Reverse; on a block,
Doloop.
DaStability: alpha
Digit alphabet
String constant with value '0123456789'
DcStability: unstable
Aliases:
Dictionary
Convert to new dictionary hoard.
DebugStability: alpha
A variable tested to see whether debugging output in the program should be enabled.
Integer constant with value 1
DecrStability: beta
Golf as:
(
Decrease by 1.
Decr_or_uncons_or_modify_firstStability: beta
Aliases:
(
Decr or Uncons or
Modify_first.
Decr_twoStability: beta
Golf as:
«
Decrease by 2.
Decr_two_or_but_lastStability: beta
Aliases:
«
Decrease by two, or all but last
Deep_lengthStability: unstable
Aliases:
Dl
Deep length.
DhStability: alpha
Hoardify the D variable: delete all variables starting with D and set D to a new empty hoard.
DictionaryStability: unstable
Aliases:
Dc
Convert to new dictionary hoard.
Digit_sumStability: alpha
Aliases:
Dr
Digit sum of integers. Deeply vectorizes. Mnemonic: r for reduce as always, since this is a reduction over the digits, and probably the most natural one.
Div_or_split_or_eachStability: stable
Aliases:
/
Float division on numbers. On a sequence and number, split the sequence into chunks of size equal to the number, including leftovers if any. On two sequences, split the first sequence around occurrences of the second sequence. For-each on blocks and sequences (numbers coerce to ranges).
See also Intdiv_or_split_discard.
[1 2 3 4]2/ => [[1 2][3 4]] [1 2 3 4 5]2/ => [[1 2][3 4][5]] "tweedledee""e"% => ["tw" "" "dl" "d" "" ""]
Divide_deep_vectorizingStability: unstable
Aliases:
Ò
Division on numbers; deeply vectorizes.
Divmod_or_zipStability: unstable
On integers, integer division and modulus. On two sequences
or a block and two sequences, Zip.
DjStability: alpha
Aliases:
Range_one_down
Range, inclusive downward from 1
DlStability: unstable
Aliases:
Deep_length
Deep length.
DoloopStability: beta
Golf as:
D
Do loop: execute the block, then pop an element, and repeat until the popped element is falsy.
DoubleStability: beta
Aliases:
×
DownStability: beta
Aliases:
Reverse
Golf as:
D
Reverse a sequence (coerces numbers to range).
Down_or_doloopStability: beta
Aliases:
Reverse_or_doloop, D
On a number of a sequence, Reverse; on a block,
Doloop.
Down_stackStability: beta
Aliases:
Reverse_stack, Ds
DpStability: alpha
Aliases:
Is_digit
Tests if characters are digits. Deeply vectorizes.
DrStability: alpha
Aliases:
Digit_sum
Digit sum of integers. Deeply vectorizes. Mnemonic: r for reduce as always, since this is a reduction over the digits, and probably the most natural one.
DsStability: beta
Aliases:
Reverse_stack, Down_stack
DumpStability: alpha
Aliases:
Pdebug
Print debugging information about the environment and stack.
DupStability: stable
Aliases:
:
Duplicate the top element of the stack.
1 2 3 : => 1 2 3 3
Dup_outStability: alpha
Aliases:
:o
Duplicate the second element of the stack onto the top: a b -> a b a
1 2 3 :o => 1 2 3 2
Dup_pairStability: beta
Duplicate the top two elements of the stack: a b -> a b a b
1 2 3 :p => 1 2 3 2 3
EStability: beta
Aliases:
Exit
Exit the current program.
EbStability: alpha
Aliases:
Epoch_minute
Get the minute from a timestamp
EcStability: beta
Aliases:
Exit_with_code
Exit the current program with the specified exit code or message.
EdStability: alpha
Aliases:
Epoch_day
Get the day from a timestamp
EeStability: beta
Float constant with value 2.718281828459045
EfStability: beta
Aliases:
Exp
Exponential Function
EhStability: alpha
Aliases:
Epoch_hour
Get the hour from a timestamp
EiStability: alpha
Aliases:
Epoch_twelve_hour
Get the hour, as a number from 1 to 12 from a timestamp
EjStability: alpha
Aliases:
Epoch_day_of_year
Get the day of year from a timestamp
EmStability: alpha
Aliases:
Epoch_month
Get the month from a timestamp
EnumerateStability: beta
Golf as:
,
Zip with indices from 0.
Enumerate_oneStability: beta
Golf as:
J
Zip with indices from 1.
EpStability: beta
Epsilon for approximate tests
Float constant with value 1e-09
Epoch_dayStability: alpha
Aliases:
Ed
Get the day from a timestamp
Epoch_day_of_yearStability: alpha
Aliases:
Ej
Get the day of year from a timestamp
Epoch_hourStability: alpha
Aliases:
Eh
Get the hour from a timestamp
Epoch_iso_weekdayStability: alpha
Aliases:
Eu
Get the ISO weekday (Monday is 1, Sunday is 7) from a timestamp
Epoch_minuteStability: alpha
Aliases:
Eb
Get the minute from a timestamp
Epoch_monthStability: alpha
Aliases:
Em
Get the month from a timestamp
Epoch_secondStability: alpha
Aliases:
Es
Get the second from a timestamp
Epoch_twelve_hourStability: alpha
Aliases:
Ei
Get the hour, as a number from 1 to 12 from a timestamp
Epoch_weekdayStability: alpha
Aliases:
Ew
Get the weekday (Monday is 0, Sunday is 6) from a timestamp
Epoch_yearStability: alpha
Aliases:
Ey
Get the year from a timestamp
EqStability: beta
Aliases:
Equal
Test for value equality.
Eq_approxStability: alpha
Aliases:
=a
Approximately equal than; tolerance is given by Ep, epsilon
Eq_lengthStability: unstable
Aliases:
=l
Equal to, after coercing two arguments to ints or floats, sequences by taking their length.
EqualStability: beta
Aliases:
Eq
Test for value equality.
Equal_identityStability: alpha
Aliases:
Is
Test for Python identity (is)
Equal_or_index_or_findStability: beta
Aliases:
=
On two numbers, two strings, or two lists, compare for equality. On a number and a sequence, index into the sequence. On a block and a sequence (numbers coerce to ranges), find the first element satisfying the block.
Equals_one_or_identicalStability: beta
Aliases:
Î
Identity (equals 1) or Identical
ErStability: unstable
Aliases:
Range_evens_exclusive
Range, evens, from 0, exclusive
EsStability: alpha
Aliases:
Epoch_second
Get the second from a timestamp
EtStability: alpha
Aliases:
Totient
Euler's Totient function. If you don't need vectorizing, Ø works too.
EuStability: alpha
Aliases:
Epoch_iso_weekday
Get the ISO weekday (Monday is 1, Sunday is 7) from a timestamp
EvStability: alpha
Aliases:
Even
EvalStability: alpha
Aliases:
Pd
Evaluate a string as Paradoc code
EvenStability: alpha
Aliases:
Ev
Even_or_anyStability: beta
Aliases:
Ê
Even or Any (Exists)
EwStability: alpha
Aliases:
Epoch_weekday
Get the weekday (Monday is 0, Sunday is 6) from a timestamp
Exchange_caseStability: alpha
Aliases:
Xc
Swaps the case of all characters. Deeply vectorizes.
Exclusive_or_or_symmetric_difference_or_find_lastStability: beta
Aliases:
^
Binary XOR on numbers. Symmetric difference on sequences. Find last on block and sequence.
Exclusive_rangeStability: beta
Aliases:
Tl
Exclusive_range_or_flatten_onceStability: beta
Aliases:
¨
ExitStability: beta
Aliases:
E
Exit the current program.
Exit_with_codeStability: beta
Aliases:
Ec
Exit the current program with the specified exit code or message.
ExpStability: beta
Aliases:
Ef
Exponential Function
EyStability: alpha
Aliases:
Epoch_year
Get the year from a timestamp
FStability: beta
Aliases:
To_float_or_fixed_point
On a non-block value, To_float; on a block,
Fixed_point.
FactorialStability: beta
Golf as:
¡
FactorizeStability: alpha
Aliases:
Fc
Factorize as a list of pairs of primes and exponents
Factorize_flatStability: alpha
Aliases:
Ff
Factorize as a flat list of possibly repeating prime factors
FbStability: beta
Aliases:
Fibonacci
FcStability: alpha
Aliases:
Factorize
Factorize as a list of pairs of primes and exponents
FfStability: alpha
Aliases:
Factorize_flat
Factorize as a flat list of possibly repeating prime factors
FgStability: alpha
Aliases:
Float_groups
Finds float-looking parts of a string and converts them to floats.
FibonacciStability: beta
Aliases:
Fb
FilterStability: stable
Golf as:
+
Filter a list by a block (numbers coerce to ranges).
Filter_indexesStability: beta
Golf as:
,
List indices at which block is true. Short: ,
Filter_notStability: stable
Aliases:
Reject
Golf as:
-
Filter-not a list by a block (numbers coerce to ranges).
Filter_not_inStability: stable
Aliases:
Reject_in
Golf as:
-
Filter-not-in on lists and strings (numbers coerce to single-element lists).
Find_indexStability: beta
Aliases:
@
Inside a sequence (numbers coerce to ranges), find the first index of an element, a substring, or something satisfying a block. Mnemonic: finds where the element is AT.
FirstStability: stable
Golf as:
‹
First of sequence
First_and_lastStability: alpha
First and last of sequence
First_duplicateStability: unstable
Aliases:
=g
Find the first element that appears a second time in a sequence.
Fixed_pointStability: alpha
Golf as:
F
Iterate a block, peeking at the stack between iterations, until a value repeats. Pushes that value. (This is more general than a "fixed point" as usually defined since it doesn't require a value to repeat after just one iteration.)
FlStability: beta
Aliases:
Flatten
FlattenStability: beta
Aliases:
Fl
Flatten_onceStability: beta
Aliases:
Fo
Float_groupsStability: alpha
Aliases:
Fg
Finds float-looking parts of a string and converts them to floats.
FloorStability: beta
Aliases:
<i
Golf as:
‹
Round down to the nearest integer.
Floor_or_firstStability: beta
Aliases:
‹
Floor or First of sequence or
Modify_first
FoStability: beta
Aliases:
Flatten_once
Force_stackStability: alpha
Aliases:
Fs
From_empty_left_slicesStability: alpha
Aliases:
«s
Left slices (including the empty one, by increasing length)
From_empty_right_slicesStability: alpha
Aliases:
»s
Right slices (including the empty one, by increasing length)
FsStability: alpha
Aliases:
Force_stack
GStability: beta
Aliases:
Group_maybe_by
GCD; group like elements of a sequence, possibly under a mapping.
GcdStability: beta
Geq_lengthStability: unstable
Aliases:
>el
Greater than or equal to, after coercing two arguments to ints or floats, sequences by taking their length.
Geq_or_sliceStability: beta
Aliases:
>e
Greater than or equal to.
GroupStability: beta
Golf as:
G
Group into runs of equal elements.
[3 1 2 2 1 1 1]G => [[3][1][2 2][1 1 1]]
Group_byStability: beta
Golf as:
G
Group into runs of equal elements according to the block
Group_maybe_byStability: beta
Aliases:
G
GCD; group like elements of a sequence, possibly under a mapping.
Gt_approxStability: alpha
Aliases:
>a
Approximately greater than; tolerance is given by Ep, epsilon
Gt_lengthStability: unstable
Aliases:
>l
Greater than, after coercing two arguments to ints or floats, sequences by taking their length.
Gt_or_sliceStability: beta
Aliases:
>
On two numbers, two strings, or two lists, compare if the first is greater than the second. On a number and a sequence, slice elements with index greater than or equal to the number, as Python s[n:]. On a sequence (numbers coerce to ranges) and a block, "drop while", or return the suffix starting with the first element that fails to satisfy the block.
HStability: alpha
An empty Hoard
HalveStability: alpha
Aliases:
½
Halve_intStability: unstable
Aliases:
Hi
Has_infixStability: unstable
Aliases:
=h
Test if the first argument has a substring equal to the second argument (numbers coerce to single-element lists; if at least one argument is a string, both coerce to strings).
Has_prefixStability: unstable
Aliases:
<h
Test if the first argument has a prefix equal to the second argument (numbers coerce to single-element lists; if at least one argument is a string, both coerce to strings).
Has_suffixStability: unstable
Aliases:
>h
Test if the first argument has a suffix equal to the second argument (numbers coerce to single-element lists; if at least one argument is a string, both coerce to strings).
Hex_stringStability: beta
Aliases:
Hs
Converts numbers to their hexadecimal representation as a string. Deeply vectorizes.
HiStability: unstable
Aliases:
Halve_int
Hoardify_aStability: alpha
Aliases:
Ah
Hoardify the A variable: delete all variables starting with A and set A to a new empty hoard.
Hoardify_bStability: alpha
Aliases:
Bh
Hoardify the B variable: delete all variables starting with B and set B to a new empty hoard.
Hoardify_cStability: alpha
Aliases:
Ch
Hoardify the C variable: delete all variables starting with C and set C to a new empty hoard.
Hoardify_dStability: alpha
Aliases:
Dh
Hoardify the D variable: delete all variables starting with D and set D to a new empty hoard.
HsStability: beta
Aliases:
Hex_string
Converts numbers to their hexadecimal representation as a string. Deeply vectorizes.
HwStability: unstable
String constant with value 'Hello, World!'
HyStability: alpha
Aliases:
Hypotenuse
Hypotenuse (square root of sum of squares; deep).
HypotenuseStability: alpha
Aliases:
Hy
Hypotenuse (square root of sum of squares; deep).
IStability: beta
Aliases:
To_int_or_iterate
On a non-block value, To_float; on a block,
Iterate.
IaStability: unstable
Aliases:
Int_of_alpha
Convert a letter to an integer starting with A = 1; non-letters (or letters outside the Latin alphabet) give 0. Deeply vectorizes.
IdenticalStability: beta
Aliases:
=p
Golf as:
Î
IfStability: alpha
Single-branch if.
If_elseStability: beta
Aliases:
?
If-else.
1 "True!" "False" ? => "True!"
IgStability: alpha
Aliases:
Int_groups
Finds integer-looking parts of a string and converts them to integers.
Imaginary_partStability: unstable
Aliases:
;j
Imaginary part. Deeply vectorizes because why not. Mnemonic: deletes part of the complex number like ;. Keeps the imaginary part rather than deleting it because direct conversion to float, F, already computes the real part.
Imaginary_unit_powerStability: unstable
Take the power of the imaginary unit to this number. Deeply vectorizes.
Inclusive_rangeStability: beta
Aliases:
To
Inclusive_range_or_flattenStability: beta
Aliases:
…
IncrStability: beta
Golf as:
)
Increase by 1.
Incr_or_unsnoc_or_modify_lastStability: beta
Aliases:
)
Incr or Unsnoc or
Modify_last.
Incr_twoStability: beta
Golf as:
»
Increase by 2.
Incr_two_or_but_firstStability: beta
Aliases:
»
Increase by two, or all but first (tail)
Index_cyclicallyStability: unstable
Aliases:
=c
Index into a list cyclically, by taking the index mod the length of the list.
Index_translateStability: unstable
Aliases:
It
Translate the first argument by indexing into the second.
Int_groupsStability: alpha
Aliases:
Ig
Finds integer-looking parts of a string and converts them to integers.
Int_of_alphaStability: unstable
Aliases:
Ia
Convert a letter to an integer starting with A = 1; non-letters (or letters outside the Latin alphabet) give 0. Deeply vectorizes.
Int_sqrtStability: alpha
Aliases:
Si
Integer square root.
Intdiv_or_split_discardStability: beta
Aliases:
÷
Integer division on numbers. On a sequence and number, split the sequence into chunks of size equal to the number, discarding leftovers.
[1 2 3 4]2/ => [[1 2][3 4]] [1 2 3 4 5]2/ => [[1 2][3 4]]
InverseStability: alpha
Aliases:
Í
Inverse (reciprocal) of numbers. Deeply vectorizes.
IsStability: alpha
Aliases:
Equal_identity
Test for Python identity (is)
Is_alphaStability: beta
Aliases:
Ap
Tests if characters are letters. Deeply vectorizes.
Is_arrayStability: alpha
Aliases:
:a
Test if array (or range)
Is_blockStability: alpha
Aliases:
:b
Test if block
Is_charStability: alpha
Aliases:
:c
Test if Char
Is_complexStability: alpha
Aliases:
:j
Test if complex
Is_digitStability: alpha
Aliases:
Dp
Tests if characters are digits. Deeply vectorizes.
Is_floatStability: alpha
Aliases:
:f
Test if float
Is_hoardStability: alpha
Aliases:
:h
Test if hoard
Is_intStability: alpha
Aliases:
:i
Test if integer
Is_lowerStability: beta
Aliases:
Lp
Tests if characters are lowercase. Deeply vectorizes.
Is_numberStability: alpha
Aliases:
:n
Test if number (char, int, float, complex)
Is_primeStability: alpha
Test if this is prime.
Is_sortedStability: beta
Aliases:
$p
Test if sorted
Is_spaceStability: alpha
Aliases:
Wp
Tests if characters are whitespace. Deeply vectorizes.
Is_strictly_decreasingStability: beta
Aliases:
>p
Test if strictly decreasing
Is_strictly_increasingStability: beta
Aliases:
<p
Test if strictly increasing
Is_stringStability: alpha
Aliases:
:s
Test if string
Is_upperStability: beta
Aliases:
Up
Tests if characters are uppercase. Deeply vectorizes.
ItStability: unstable
Aliases:
Index_translate
Translate the first argument by indexing into the second.
IterateStability: unstable
Golf as:
I
Iterate a block, peeking at the stack between iterations, until a value repeats. Pushes all values peeked until (excluding) the repeated value.
JStability: beta
Aliases:
Range_enumerate_one_or_reject_indices
Range, inclusive from 1, on numbers. Enumerate from 1 (zip with indices from 1) on sequences. On block and sequence, list indices at which block is false. Mnemonic: the letter J looks like a big comma.
Compare Range_enumerate_or_filter_indices.
Jacobi_symbolStability: unstable
Aliases:
Js
Jacobi symbol of two numbers
JsStability: unstable
Aliases:
Jacobi_symbol
Jacobi symbol of two numbers
KStability: beta
Aliases:
Continue, Keep_going
Skip to the next iteration of the current loop.
Keep_goingStability: beta
Skip to the next iteration of the current loop.
Key_getStability: alpha
Aliases:
Kg
Access value corresponding to a key in an array.
Key_mapStability: alpha
Aliases:
Km
Map over keys of an array.
Key_newStability: alpha
Aliases:
Kn
Make an array given a starting list of key-value pairs, dimensions, and filler.
KgStability: alpha
Aliases:
Key_get
Access value corresponding to a key in an array.
King_neighborsStability: unstable
Aliases:
*n
Return a list of almost-copies of the object, every variant obtainable by modifying each deep element by -1, 0, or 1, except for the original object itself.
KmStability: alpha
Aliases:
Key_map
Map over keys of an array.
KnStability: alpha
Aliases:
Key_new
Make an array given a starting list of key-value pairs, dimensions, and filler.
LStability: alpha
Aliases:
Abs_or_len_or_loop
Abs on numbers; Len on sequences; Loop on blocks.
LaStability: alpha
Lowercase alphabet
String constant with value 'abcdefghijklmnopqrstuvwxyz'
LastStability: stable
Golf as:
›
Last of sequence
LbStability: beta
Aliases:
Lower_base
Converts the first number to a string of digits in the radix of the second, using lowercase digits. Deeply vectorizes over the first.
LcStability: beta
Aliases:
Lowercase
Converts all characters to lowercase. Deeply vectorizes.
LcmStability: unstable
LCM of two numbers, or of a list, deeply.
Least_frequentStability: alpha
Aliases:
#œ
Least frequently appearing element.
Left_addStability: unstable
Aliases:
«p
Given a list (numbers coerce to ranges), a number, and a filler object, left-pad the list with number copies of the filler object.
Left_add_spacesStability: unstable
Aliases:
‹p
Given a value and a length, convert the value to a string if necessary and prepend that many spaces. Mnemonic: well, left-pad (but "fill" doesn't make sense unless you're filling up to something, whereas padding still makes sense.)
Left_cycleStability: unstable
Aliases:
<c
Left cycle a list or string by some number of elements, which are cut off the left and reattached to the right.
Left_cycle_oneStability: unstable
Aliases:
<o
Left cycle a list or string Once: move the first element to the last.
Left_fillStability: unstable
Aliases:
[f
Given a list (numbers coerce to ranges), a length, and a filler object, left-pad the list with the filler object until at least the length.
Left_fill_with_spacesStability: unstable
Aliases:
<f
Given a value and a length, convert the value to a string if necessary and left-pad it with spaces until at least the length.
Left_shiftStability: beta
Golf as:
<s
Bitwise left shift
Left_shift_or_slicesStability: alpha
Aliases:
<s
Left_shift on numbers, Left_slices on a
sequence
Left_slicesStability: alpha
Golf as:
<s
Left slices (nonempty, by increasing length)
LenStability: stable
Golf as:
L
Length of a sequence.
Length_stackStability: beta
Aliases:
Ls
Leq_lengthStability: unstable
Aliases:
<el
Less than or equal to, after coercing two arguments to ints or floats, sequences by taking their length.
Leq_or_sliceStability: beta
Aliases:
<e
Less than or equal to.
LgStability: alpha
Aliases:
Log_two
LiStability: unstable
Aliases:
Lower_of_int
Convert an integer to a lowercase letter starting with a = 1; things outside the range 1 to 26 give spaces. Deeply vectorizes.
Line_breakStability: alpha
Aliases:
Line_split, Lines, , NEWLINEb\nb
Split by a single newline.
Line_joinStability: beta
Join with newlines
Line_splitStability: alpha
Aliases:
Lines, Line_break, , NEWLINEb\nb
Split by a single newline.
LinesStability: alpha
Aliases:
Line_split, Line_break, , NEWLINEb\nb
Split by a single newline.
LnStability: beta
Aliases:
Log_e
Log_eStability: beta
Aliases:
Ln
Log_tenStability: alpha
Aliases:
Lt
Log_twoStability: alpha
Aliases:
Lg
LoopStability: alpha
Golf as:
L
Loop forever (until Break or other error.)
LoopzipStability: alpha
Aliases:
Oz
Zip two sequences (numbers coerce to ranges), returning a list of length-2 lists; or zip them with a block, which operates on corresponding pairs of the two lists. The result has length equal to that of the longest list; the shorter list, if one exists, is looped until it is the right length. Mnemonic: O looks like a loop.
Lower_baseStability: beta
Aliases:
Lb
Converts the first number to a string of digits in the radix of the second, using lowercase digits. Deeply vectorizes over the first.
Lower_of_intStability: unstable
Aliases:
Li
Convert an integer to a lowercase letter starting with a = 1; things outside the range 1 to 26 give spaces. Deeply vectorizes.
LowercaseStability: beta
Aliases:
Lc
Converts all characters to lowercase. Deeply vectorizes.
LpStability: beta
Aliases:
Is_lower
Tests if characters are lowercase. Deeply vectorizes.
LsStability: beta
Aliases:
Length_stack
LtStability: alpha
Aliases:
Log_ten
Lt_approxStability: alpha
Aliases:
<a
Approximately less than; tolerance is given by Ep, epsilon
Lt_lengthStability: unstable
Aliases:
<l
Less than, after coercing two arguments to ints or floats, sequences by taking their length.
Lt_or_sliceStability: beta
Aliases:
<
On two numbers, two strings, or two lists, compare if the first is less than the second. On a number and a sequence, slice elements with index less than the number, as Python s[:n]. On a sequence (numbers coerce to ranges) and a block, "take while", or return the longest prefix of elements that all satisfy the block.
MStability: alpha
Aliases:
Negate_or_mold_or_memoize
Negate a number, or Mold a sequence
like another, or Memoize a block.
Map_on_linesStability: alpha
Map on lines: takes a block and a string, split the string into lines, map the block over the tokens, then join the tokens with a linebreak.
Map_on_wordsStability: alpha
Aliases:
SPACEm
Map on words: takes a block and a string, split the string by spaces, map the block over the tokens, then join the tokens with a space.
MarkStability: stable
Aliases:
[
Mark the stack.
MaskStability: alpha
Golf as:
€
Mask: Zip two sequences and filter for elements of the first where the corresponding elements of the second are truthy.
Matching_characterStability: alpha
Aliases:
Mc
Finds the matching character for one of the characters ()[]{}<>, or returns the character itself. Deeply vectorizes.
Matching_prefixStability: alpha
Aliases:
Shared_prefix, Ys, Ym
Find the longest prefix shared between two sequences. Mnemonic for this and related operations: Y is a fork where the bottom is the shared prefix and the top are the diverging suffixes. 's' is for same or shared.
MaxStability: beta
Maximum of two values, optionally by a block
Max_deep_vectorizingStability: unstable
Maximum of two values; deeply vectorizes.
McStability: alpha
Aliases:
Matching_character
Finds the matching character for one of the characters ()[]{}<>, or returns the character itself. Deeply vectorizes.
Median_of_threeStability: alpha
Aliases:
=m
Median of three values, optionally by a block
MemoStability: alpha
Aliases:
Memoize
Golf as:
M
Memoize a block.
MemoizeStability: alpha
Aliases:
Memo
Golf as:
M
Memoize a block.
MfStability: alpha
Aliases:
Mold_fill
Repeat the first element as many times as needed to mold a sequence like the second.
MinStability: beta
Minimum of two values, optionally by a block
Min_deep_vectorizingStability: unstable
Minimum of two values; deeply vectorizes.
MinusStability: stable
Golf as:
-
Subtract numbers.
Minus_deep_vectorizingStability: unstable
Aliases:
À
Subraction on numbers; deeply vectorizes.
Minus_intsStability: unstable
Aliases:
-i
Subtract two things after coercing both to integers.
Minus_lengthsStability: unstable
Aliases:
-l
Subtract two things after coercing both to ints or floats, sequences by taking their length.
Minus_or_rejectStability: stable
Aliases:
-
Golf as:
-
Subtraction on numbers. Filter-not-in on lists and strings
(numbers coerce to single-element lists). Filter-not on block and
list (numbers coerce to ranges). See also Antiminus.
Mismatch_formerStability: unstable
Given two sequences, find the first element in the first sequence that isn't at the corresponding index in the second. Errors if there isn't such an element. Mnemonic for this and related operations: Y is a fork where the bottom is the shared prefix and the top are the diverging suffixes; 'f' is for 'former' / 'a' is the first letter of the alphabet.
Mismatch_indexStability: alpha
Aliases:
Yi
Find the length of the longest prefix shared between two sequences; equivalently, the index of the first element where they diverge, except that it'll be the length of the list if they are identical. Mnemonic for this and related operations: Y is a fork where the bottom is the shared prefix and the top are the diverging suffixes; 'i' is for index.
Mismatch_latterStability: unstable
Given two sequences, find the first element in the second sequence that isn't at the corresponding index in the second. Errors if there isn't such an element. Mnemonic for this and related operations: Y is a fork where the bottom is the shared prefix and the top are the diverging suffixes; 'l' is for 'latter' / 'b' is the second letter of the alphabet.
Mismatch_pairStability: alpha
Aliases:
Yp
Find the first elements after the longest prefix shared between two sequences. Returns a list. If the two sequences are equal, the list will be empty. If one sequence is a proper prefix of the other, the list will just have one element (and you won't be able to tell which sequence it came from). Mnemonic for this and related operations: Y is a fork where the bottom is the shared prefix and the top are the diverging suffixes; 'p' is for pair, which the return value usually is.
Mismatch_suffixesStability: alpha
Aliases:
Yd
Find the suffixes after the longest prefix shared between two sequences. Mnemonic for this and related operations: Y is a fork where the bottom is the shared prefix and the top are the diverging suffixes. 'd' is for different or diverging.
MjStability: alpha
Aliases:
Conjugate
Negate the imaginary part. Deeply vectorizes.
Mod_or_slice_mod_or_split_nonempty_or_mapStability: stable
Aliases:
%
Modulus on numbers. On a sequence and number, slice elements at indices equal to 0 mod the number, just like Python s[::n] (negative numbers reverse the sequence). On two sequences, split the first sequence around occurrences of the second sequence, discarding empty tokens. Map on blocks and sequences (numbers coerce to ranges).
"tweedledee""e"% => ["tw" "dl" "d"]
Modify_firstStability: beta
Golf as:
(
Run a block over the first element of a list, then replace it in the list with the result.
Modify_lastStability: beta
Golf as:
)
Run a block over the last element of a list, then replace it in the list with the result.
Modulus_deep_vectorizingStability: unstable
Aliases:
Ú
Modulus on numbers; deeply vectorizes.
MoldStability: alpha
Golf as:
M
Mold the first sequence like the second.
Mold_fillStability: alpha
Aliases:
Mf
Repeat the first element as many times as needed to mold a sequence like the second.
Most_frequentStability: alpha
Aliases:
#æ
Most frequently appearing element.
Mul_or_xloopStability: beta
Aliases:
*
Multiplication on numbers. Repetition on sequences with
numbers. "Flat" Cartesian product on two sequences (this returns a
single-level list of pairs, rather than a list of lists of pairs;
if you want the latter, see T). X-loop on blocks and
sequences, in which elements and corresponding indices are pushed
onto the X-stack, but not pushed onto the stack (numbers coerce to
ranges, so, if you don't use the variable X, it's just repeating a
block some number of times.)
See also _xloop.
3 {2*} 4* => 48
{X} 4* => 0 1 2 3
[2 3 5 7] {2X#} * => 4 8 32 128
Multiply_deep_vectorizingStability: unstable
Aliases:
Ó
Multiplication on numbers; deeply vectorizes.
NStability: stable
Output record separator
String constant with value '\n'
NaStability: beta
Aliases:
Not_all
NbStability: alpha
Aliases:
Now_minute
Get the current minute
NcStability: alpha
Aliases:
Nest_of_character
Finds the amount by which a character affects "nestedness": ([{< give +1, >}]) give -1, everything else gives 0. Deeply vectorizes.
NdStability: alpha
Aliases:
Now_day
Get the current day
NeStability: beta
Aliases:
Not_any, Not_exists
Golf as:
Ô
NegateStability: beta
Golf as:
M
Negate a number.
Negate_deepStability: alpha
Aliases:
Ì
Negate numbers. Deeply vectorizes.
Negate_or_mold_or_memoizeStability: alpha
Aliases:
M
Negate a number, or Mold a sequence
like another, or Memoize a block.
Negate_realStability: unstable
Aliases:
|j
Negate the real part. Deeply vectorizes. Mnemonic: reflect this across the vertical y-axis on the complex plane. (Really really unstable.)
NegativeStability: beta
Aliases:
-p
Negative_biased_balanced_modStability: unstable
Aliases:
%û
Balanced mod: on a and b, returns the number that's equal to a mod b and as close to 0 as possible, preferring -|b|/2 over |b|/2.
Negative_or_zeroStability: alpha
Aliases:
-o
Nest_of_characterStability: alpha
Aliases:
Nc
Finds the amount by which a character affects "nestedness": ([{< give +1, >}]) give -1, everything else gives 0. Deeply vectorizes.
Newline_outputStability: beta
Output a newline.
Newline_printStability: beta
Output a newline, followed by an output record separator.
Newline_repeatStability: alpha
Next_primeStability: alpha
Aliases:
)p
Find the smallest prime larger than this.
NhStability: alpha
Aliases:
Now_hour
Get the current hour
NiStability: alpha
Aliases:
Now_twelve_hour
Get the current hour, as a number from 1 to 12
NjStability: alpha
Aliases:
Now_day_of_year
Get the current day of year
NmStability: alpha
Aliases:
Now_month
Get the current month
NopStability: stable
Aliases:
, SPACE, TAB, NEWLINERETURN
Do nothing.
NotStability: stable
Golf as:
!
Logical NOT: 0 and empty lists/strings yield 1, everything else yields 0.
0! => 1 1! => 0 2! => 0 []! => 1 [0]! => 0
Not_allStability: beta
Aliases:
Na
Not_anyStability: beta
Aliases:
Not_exists, Ne
Golf as:
Ô
Not_existsStability: beta
Golf as:
Ô
Not_imaginaryStability: unstable
Aliases:
!j
Test if the imaginary part is zero. Deeply vectorizes.
Now_dayStability: alpha
Aliases:
Nd
Get the current day
Now_day_of_yearStability: alpha
Aliases:
Nj
Get the current day of year
Now_hourStability: alpha
Aliases:
Nh
Get the current hour
Now_iso_weekdayStability: alpha
Aliases:
Nu
Get the current ISO weekday (Monday is 1, Sunday is 7)
Now_minuteStability: alpha
Aliases:
Nb
Get the current minute
Now_monthStability: alpha
Aliases:
Nm
Get the current month
Now_secondStability: alpha
Aliases:
Ns
Get the current second
Now_timeStability: alpha
Aliases:
Nt
Now_twelve_hourStability: alpha
Aliases:
Ni
Get the current hour, as a number from 1 to 12
Now_weekdayStability: alpha
Aliases:
Nw
Get the current weekday (Monday is 0, Sunday is 6)
Now_yearStability: alpha
Aliases:
Ny
Get the current year
NsStability: alpha
Aliases:
Now_second
Get the current second
NtStability: alpha
Aliases:
Now_time
NuStability: alpha
Aliases:
Now_iso_weekday
Get the current ISO weekday (Monday is 1, Sunday is 7)
NwStability: alpha
Aliases:
Now_weekday
Get the current weekday (Monday is 0, Sunday is 6)
NyStability: alpha
Aliases:
Now_year
Get the current year
OStability: beta
Aliases:
Output
Output to standard output.
OdStability: alpha
Aliases:
Odd
OddStability: alpha
Aliases:
Od
Odd_or_not_anyStability: beta
Aliases:
Ô
Odd or Not_any
One_time_translateStability: alpha
Aliases:
Ot
Translate the first argument using a mapping obtained by zipping the second and third, repeating the last element of the third as necessary. Each entry in the mapping is used at most once, in the order they appear.
OrStability: unstable
Aliases:
Range_odds_exclusive
Range, odds, from 1, exclusive
Order_statisticStability: alpha
Aliases:
¢
Order statistic (zero-indexed)
OrganizeStability: alpha
Golf as:
Ø
Group into lists of equal elements; like Group,
but the equal elements don't need to be consecutive. The lists come
in the same order that their elements' first appearances did in the
original list.
[3 1 2 2 1 1 1]Organize => [[3][1 1 1 1][2 2]]
Organize_or_totientStability: alpha
Aliases:
Ø
On numbers, Euler's Totient function (does not
vectorize). On sequences or blocks with sequences, Organize.
Orthogonal_neighborsStability: unstable
Aliases:
+n
Return a list of almost-copies of the object, two per deep element, one with that deep element decreased by 1 and one with it increased by 1.
OsStability: beta
Aliases:
Output_stack
OtStability: alpha
Aliases:
One_time_translate
Translate the first argument using a mapping obtained by zipping the second and third, repeating the last element of the third as necessary. Each entry in the mapping is used at most once, in the order they appear.
OutputStability: beta
Aliases:
O
Output to standard output.
Output_stackStability: beta
Aliases:
Os
OzStability: alpha
Aliases:
Loopzip
Zip two sequences (numbers coerce to ranges), returning a list of length-2 lists; or zip them with a block, which operates on corresponding pairs of the two lists. The result has length equal to that of the longest list; the shorter list, if one exists, is looped until it is the right length. Mnemonic: O looks like a loop.
PStability: beta
Aliases:
Print
Output to standard output, followed by an output record separator.
PackStability: stable
Aliases:
]
Pack the elements above the last stack mark into a list.
Pack_downStability: stable
Aliases:
¬, Pack_reverse
Pack the elements above the last stack mark into a list in reverse order.
[1 2 3¬ => [3 2 1]
Pack_reverseStability: stable
Pack the elements above the last stack mark into a list in reverse order.
[1 2 3¬ => [3 2 1]
PalindromizeStability: alpha
Aliases:
Pz
Concatenate a with the tail of its reverse.
PdStability: alpha
Aliases:
Eval
Evaluate a string as Paradoc code
PdebugStability: alpha
Aliases:
Dump
Print debugging information about the environment and stack.
PeekdoStability: beta
Golf as:
D
Like Doloop except the condition is peeked
instead of popped.
PermutationsStability: beta
Golf as:
¡
Permutations_or_factorialStability: beta
PhStability: alpha
Golden ratio
Float constant with value 1.618033988749895
PhiStability: alpha
Float constant with value 1.618033988749895
PiStability: stable
Float constant with value 3.141592653589793
PlStability: unstable
Aliases:
Print_lines
Output each element of a sequence to standard output, each followed by an output record separator. At the end, output an extra output record separator.
PlusStability: stable
Golf as:
+
Add numbers.
Plus_deep_vectorizingStability: unstable
Aliases:
Á
Addition on numbers; deeply vectorizes.
Plus_intsStability: alpha
Aliases:
+i
Add two things after coercing both to integers.
Plus_lengthsStability: unstable
Aliases:
+l
Add two things after coercing both to ints or floats, sequences by taking their length.
Plus_or_filterStability: stable
Aliases:
Plus_or_filter_or_compose, +
Addition on numbers. Concatenation on lists and strings (numbers coerce to single-element lists or to strings). Filter on block and list (numbers coerce to ranges). Compose on blocks.
Plus_or_filter_or_composeStability: stable
Aliases:
+, Plus_or_filter
Addition on numbers. Concatenation on lists and strings (numbers coerce to single-element lists or to strings). Filter on block and list (numbers coerce to ranges). Compose on blocks.
PopStability: stable
Aliases:
;
Pop the top element of the stack.
1 2 3; => 1 2
Pop_aroundStability: unstable
Aliases:
;a
Pop the first and third from the top elements of the stack,
named to be somewhat analogous to \a.
1 2 3;a => 2
Pop_ifStability: alpha
Aliases:
;i
Pop the top element of the stack. Pop the second element if the first element was truthy.
Pop_if_falseStability: alpha
Aliases:
;f
Look at the top element of the stack. Pop it if it's falsy.
Pop_if_notStability: alpha
Aliases:
;n
Pop the top element of the stack. Pop the second element if the first element was falsy.
Pop_if_trueStability: alpha
Aliases:
;t
Look at the top element of the stack. Pop it if it's truthy.
Pop_outStability: unstable
Aliases:
;o
Pop the third from the top element of the stack, named to
be somewhat analogous to \o.
1 2 3;o => 2 3
Pop_second_pairStability: unstable
Aliases:
;p
Pop the second and third from the top elements of the
stack. Not the first and second because that's
;_d.
1 2 3;p => 3
Pop_stackStability: beta
Aliases:
;s
Pop_underStability: beta
Aliases:
¸
Pop the second from the top element of the stack.
1 2 3¸ => 1 3
PositiveStability: beta
Aliases:
+p
Positive_biased_balanced_modStability: unstable
Aliases:
%â
Balanced mod: on a and b, returns the number that's equal to a mod b and as close to 0 as possible, preferring |b|/2 over -|b|/2.
Positive_or_zeroStability: alpha
Aliases:
+o
PowerStability: beta
On numbers, power/exponentiate. On a list and a number, exponentiate the list by making a list of all lists of that length composed of elements from the original list (possibly repeating).
Power_of_tenStability: alpha
Golf as:
€
PpStability: alpha
Test if this is prime.
Prev_primeStability: alpha
Aliases:
(p
Find the largest prime smaller than this.
PrintStability: beta
Aliases:
P
Output to standard output, followed by an output record separator.
Print_linesStability: unstable
Aliases:
Pl
Output each element of a sequence to standard output, each followed by an output record separator. At the end, output an extra output record separator.
Print_stackStability: beta
Aliases:
Ps
PrintkeepStability: unstable
Pop something, output to standard output followed by an
output record separator, then push it back. Pretty much just Print__keep.
ProductStability: alpha
(Deep) product (coerces numbers to range!?).
Product_mapStability: alpha
Golf as:
B
Map over the Cartesian product of two sequences, resulting in a list.
Product_stackStability: beta
Aliases:
Þs
PsStability: beta
Aliases:
Print_stack
Pure_imaginaryStability: unstable
Test if the real part is zero. Deeply vectorizes.
PyStability: alpha
Aliases:
Python
Evaluate arbitrary Python code. Push the result if non-None.
Disabled in sandbox mode.
PythonStability: alpha
Aliases:
Py
Evaluate arbitrary Python code. Push the result if non-None.
Disabled in sandbox mode.
PzStability: alpha
Aliases:
Palindromize
Concatenate a with the tail of its reverse.
QStability: beta
Break out of the current loop.
QoStability: alpha
Aliases:
Quine_output
Output the value of Qn, which will usually be the current program
QpStability: alpha
Aliases:
Quine_print
Print the value of Qn, which will usually be the current program
QuarterStability: alpha
Aliases:
¼
Quine_outputStability: alpha
Aliases:
Qo
Output the value of Qn, which will usually be the current program
Quine_printStability: alpha
Aliases:
Qp
Print the value of Qn, which will usually be the current program
Quit_loopStability: beta
Break out of the current loop.
QzStability: alpha
Aliases:
Rectangularize
Rectangularize a matrix: append the filler element as necessary to rows until the matrix is rectangular. Mnemonic: Q for Quadrangle.
RStability: beta
Aliases:
Reduce
Random_choiceStability: alpha
Aliases:
Rc
Random_floatStability: alpha
Aliases:
Rf
Random_gaussianStability: alpha
Aliases:
Rg
Random_intStability: alpha
Aliases:
Ri
Random_seedStability: alpha
RangeStability: beta
Golf as:
,
Range (half-open from 0).
Range_enumerate_one_or_reject_indicesStability: beta
Aliases:
J
Range, inclusive from 1, on numbers. Enumerate from 1 (zip with indices from 1) on sequences. On block and sequence, list indices at which block is false. Mnemonic: the letter J looks like a big comma.
Compare Range_enumerate_or_filter_indices.
Range_enumerate_or_filter_indicesStability: beta
Aliases:
,
Range on numbers. Enumerate (zip with indices from 0) on sequences. On block and sequence, list indices at which block is true.
Compare Range_enumerate_one_or_reject_indices.
Range_evens_exclusiveStability: unstable
Aliases:
Er
Range, evens, from 0, exclusive
Range_len_keepStability: unstable
Aliases:
´
Range on numbers; range of indices of sequence. Keeps the operand on the stack! Mnemonic: looks like a comma, except it's higher, so the stack will be taller after running it.
Range_odds_exclusiveStability: unstable
Aliases:
Or
Range, odds, from 1, exclusive
Range_oneStability: beta
Golf as:
J
Range, inclusive from 1.
Range_one_downStability: alpha
Aliases:
Dj
Range, inclusive downward from 1
RcStability: alpha
Aliases:
Random_choice
Read_inputStability: alpha
Aliases:
V
Read something from standard input, as determined by the current input trigger.
RectangularizeStability: alpha
Aliases:
Qz
Rectangularize a matrix: append the filler element as necessary to rows until the matrix is rectangular. Mnemonic: Q for Quadrangle.
Rectangularize_with_spaceStability: alpha
Aliases:
SPACEq
Rectangularize a matrix with spaces: append the space character as necessary to rows until the matrix is rectangular. Mnemonic: Q for Quadrangle.
ReduceStability: beta
Aliases:
R
Reduce_complexStability: unstable
Aliases:
Rj
Create a complex number for a list with a real and imaginary part. Actually, for a full list, multiplies successive elements by powers of 1j and computes the sum of all the results. Mnemonic: This is shaped like a reduce because it takes a list and returns a single number.
Regex_arrayStability: unstable
Aliases:
Xa
Take a string and a regex, and find all matches (this is Python's re.finditer, and its caveats apply.) Returns a list with one list for each match; each list consists of the string matched by the regex followed by all of the regex's groups.
Regex_matchStability: unstable
Aliases:
Xm
Take a string and a regex, and attempt to match the regex exactly against the entire string. Returns a list consisting of the string matched by the regex followed by all of the regex's groups, or an empty list if no match is found (so the truthiness of the result is whether a match is found).
Regex_searchStability: unstable
Aliases:
Xs
Take a string and a regex, and perform a regex search through the string. Returns a list consisting of the string matched by the regex followed by all of the regex's groups, or an empty list if no match is found (so the truthiness of the result is whether a match is found).
RejectStability: stable
Aliases:
Filter_not
Golf as:
-
Filter-not a list by a block (numbers coerce to ranges).
Reject_inStability: stable
Aliases:
Filter_not_in
Golf as:
-
Filter-not-in on lists and strings (numbers coerce to single-element lists).
ReplicateStability: beta
Make a list by repeating an element some number of times.
ReprStability: beta
Aliases:
`
Push the string Paradoc representation of the top element.
ReverseStability: beta
Aliases:
Down
Golf as:
D
Reverse a sequence (coerces numbers to range).
Reverse_one_or_mapStability: alpha
Aliases:
Ð
On numbers, reverse inclusive range from that number to
1 (i.e. Range_one_down). On sequences, reverse each element
(numbers coerce to length-1 lists, and characters coerce to
length-1 strings, so you can also use this to wrap each element of
a flat list into a list). (Heavily inspired by studying
05AB1E.)
Reverse_or_doloopStability: beta
Aliases:
Down_or_doloop, D
On a number of a sequence, Reverse; on a block,
Doloop.
Reverse_stackStability: beta
Aliases:
Down_stack, Ds
RfStability: alpha
Aliases:
Random_float
RgStability: alpha
Aliases:
Random_gaussian
RiStability: alpha
Aliases:
Random_int
Right_addStability: unstable
Aliases:
»p
Given a list (numbers coerce to ranges), a number, and a filler object, right-pad the list with number copies of the filler object.
Right_add_spacesStability: unstable
Aliases:
›p
Given a value and a length, convert the value to a string if necessary and append that many spaces. Mnemonic: well, right-pad (but "fill" doesn't make sense unless you're filling up to something, whereas padding still makes sense.)
Right_cycleStability: unstable
Aliases:
>c
Right cycle a list or string by some number of elements, which are cut off the right and reattached to the left.
Right_cycle_oneStability: unstable
Aliases:
>o
Right cycle a list or string Once: move the last element to the first.
Right_fillStability: unstable
Aliases:
]f
Given a list (numbers coerce to ranges), a length, and a filler object, right-pad the list with the filler object until at least the length.
Right_fill_with_spacesStability: unstable
Aliases:
>f
Given a value and a length, convert the value to a string if necessary and right-pad it with spaces until at least the length.
Right_shiftStability: beta
Golf as:
>s
Bitwise right shift
Right_shift_or_slicesStability: alpha
Aliases:
>s
Right_shift on numbers, Right_slices on
a sequence
Right_slicesStability: alpha
Golf as:
>s
Right slices (nonempty, by increasing length)
RjStability: unstable
Aliases:
Reduce_complex
Create a complex number for a list with a real and imaginary part. Actually, for a full list, multiplies successive elements by powers of 1j and computes the sum of all the results. Mnemonic: This is shaped like a reduce because it takes a list and returns a single number.
RoStability: alpha
Aliases:
Rotate
Rotate a matrix, or list of lists, 90 degrees counterclockwise (just by vague mathematical convention of angle).
RotateStability: alpha
Aliases:
Ro
Rotate a matrix, or list of lists, 90 degrees counterclockwise (just by vague mathematical convention of angle).
RoundStability: alpha
Aliases:
=i
Round to the nearest integer; follows Python's rules.
Round_or_first_and_lastStability: alpha
Aliases:
¤
RpStability: beta
Make a list by repeating an element some number of times.
SStability: beta
Aliases:
To_string
Convert to string
ScStability: alpha
Aliases:
Sec
SecStability: alpha
Aliases:
Sc
SgStability: alpha
Aliases:
Standard_deviation
Standard deviation (deep). Mnemonic: sigma
ShStability: alpha
Aliases:
Shell
Evaluate shell code. If given a string, executes it through the shell; if given a list, executes the first element as the executable with the following elements of the list as arguments. Pushes the stdout of the subprocess.
Disabled in sandbox mode.
Shared_prefixStability: alpha
Aliases:
Matching_prefix, Ys, Ym
Find the longest prefix shared between two sequences. Mnemonic for this and related operations: Y is a fork where the bottom is the shared prefix and the top are the diverging suffixes. 's' is for same or shared.
ShellStability: alpha
Aliases:
Sh
Evaluate shell code. If given a string, executes it through the shell; if given a list, executes the first element as the executable with the following elements of the list as arguments. Pushes the stdout of the subprocess.
Disabled in sandbox mode.
SiStability: alpha
Aliases:
Int_sqrt
Integer square root.
Signed_replicateStability: unstable
Aliases:
Sr
Make a list by repeating one of two elements some number of times, the first one if negative and the second one if positive.
SignumStability: beta
Golf as:
U
Signum of a number (-1, 0, 1) by sign.
Signum_or_uniquify_or_untilStability: alpha
Aliases:
U
Signum or uniquify or until. Mnemonic: U for Unit
SinStability: beta
Aliases:
Sn
SlStability: alpha
Aliases:
Sleep
Sleep for some number of seconds.
SleepStability: alpha
Aliases:
Sl
Sleep for some number of seconds.
SnStability: beta
Aliases:
Sin
SortStability: stable
Golf as:
$
Sort
Sort_or_stack_selectStability: beta
Aliases:
$
Sort or select from stack
Space_breakStability: alpha
Aliases:
Space_split, SPACEb
Split by a single space. Note that this returns empty
strings between adjacent spaces, as well as at the start or end if
the string starts or ends with spaces, and it does not split by
other whitespace. Use Words if you don't want that.
Space_joinStability: beta
Aliases:
SPACEr
Space_outputStability: beta
Aliases:
SPACEo
Output a space.
Space_repeatStability: alpha
Aliases:
SPACEx
Space_splitStability: alpha
Aliases:
Space_break, SPACEb
Split by a single space. Note that this returns empty
strings between adjacent spaces, as well as at the start or end if
the string starts or ends with spaces, and it does not split by
other whitespace. Use Words if you don't want that.
SquareStability: beta
Aliases:
²
Square a number, or compute the Cartesian product of a sequence with itself, or map a block across that.
Square_deepStability: alpha
Aliases:
È
Square of numbers. Deeply vectorizes.
SrStability: unstable
Aliases:
Signed_replicate
Make a list by repeating one of two elements some number of times, the first one if negative and the second one if positive.
SsStability: beta
Aliases:
Subsequences, ¿
Standard_deviationStability: alpha
Aliases:
Sg
Standard deviation (deep). Mnemonic: sigma
StrcatStability: stable
Golf as:
+
Concatenate two strings (numbers coerce to strings).
SubsequencesStability: beta
SumStability: beta
(Deep) sum (coerces numbers to range).
Sum_stackStability: beta
Aliases:
Šs
SwapStability: stable
Aliases:
\
Swap the top two elements of the stack.
1 2 3\ => 1 3 2
Swap_aroundStability: alpha
Aliases:
\a
Swap the first and third elements of the stack (swap "around" the second one).
1 2 3\a => 3 2 1
Swap_inStability: beta
Aliases:
\i
Rotate the top three elements of the stack so that the top is now on bottom ("inward" by two): a b c -> c a b
1 2 3\i => 3 1 2
Swap_outStability: beta
Aliases:
\o
Rotate the top three elements of the stack so that the 3rd from the top is now on top ("outward" by two): a b c -> b c a
1 2 3\o => 2 3 1
TStability: alpha
Aliases:
Table
On two sequences (numbers coerce to ranges), "structured"
Cartesian product: make a "table", or a list of lists, of pairs of
elements. On a block and two sequences (number coerce to ranges),
make a "table" of results of mapping pairs of elements. For the
flat versions, see * or B.
TableStability: alpha
Aliases:
T
On two sequences (numbers coerce to ranges), "structured"
Cartesian product: make a "table", or a list of lists, of pairs of
elements. On a block and two sequences (number coerce to ranges),
make a "table" of results of mapping pairs of elements. For the
flat versions, see * or B.
TanStability: beta
Aliases:
Tn
TcStability: alpha
Aliases:
Title_case
Title-cases all strings?
TfStability: alpha
Aliases:
Transpose_fill
Given a filler element, transpose a matrix, or list of lists, with the filler element repeated as necessary until the matrix is rectangular.
Three_quartersStability: alpha
Aliases:
¾
Title_caseStability: alpha
Aliases:
Tc
Title-cases all strings?
TlStability: beta
Aliases:
Exclusive_range
TnStability: beta
Aliases:
Tan
ToStability: beta
Aliases:
Inclusive_range
To_charStability: beta
Golf as:
C
Convert to char
To_char_or_peekloopStability: alpha
Aliases:
C
On a non-block value, To_char; on a block,
Peekdo. Mnemonic: "C" is right next to "D" and it's a
homophone of "see", which is a synonym of "peek".
To_floatStability: beta
Golf as:
F
Convert to float
To_float_or_fixed_pointStability: beta
Aliases:
F
On a non-block value, To_float; on a block,
Fixed_point.
To_intStability: beta
Golf as:
I
Convert to int
To_int_or_iterateStability: beta
Aliases:
I
On a non-block value, To_float; on a block,
Iterate.
To_stringStability: beta
Aliases:
S
Convert to string
TotientStability: alpha
Aliases:
Et
Euler's Totient function. If you don't need vectorizing, Ø works too.
TranslateStability: alpha
Aliases:
Zt
Translate the first argument using a mapping obtained by zipping the second and third, mapping elements of the second to elements of the third, repeating the last element of the third as necessary.
TransposeStability: beta
Transpose a matrix, or list of lists. Mnemonic: matrices are transposed by a superscript T, so Tt is just that "doubled" and ™ is "Transpose Matrix" superscripted.
Transpose_fillStability: alpha
Aliases:
Tf
Given a filler element, transpose a matrix, or list of lists, with the filler element repeated as necessary until the matrix is rectangular.
Transpose_fill_with_spaceStability: alpha
Aliases:
SPACEt
Transpose a matrix, or list of lists (or of strings), adding the space character as necessary until the matrix is rectangular.
TtStability: beta
Transpose a matrix, or list of lists. Mnemonic: matrices are transposed by a superscript T, so Tt is just that "doubled" and ™ is "Transpose Matrix" superscripted.
Two_power_vectorizingStability: alpha
Aliases:
É
Two to the power of numbers. Deeply vectorizes.
UStability: alpha
Aliases:
Signum_or_uniquify_or_until
Signum or uniquify or until. Mnemonic: U for Unit
UaStability: alpha
Uppercase alphabet
String constant with value 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
UbStability: beta
Aliases:
Upper_base
Converts the first number to a string of digits in the radix of the second, using uppercase digits. Deeply vectorizes over the first.
UcStability: beta
Aliases:
Uppercase
Converts all characters to uppercase. Deeply vectorizes.
UiStability: unstable
Aliases:
Upper_of_int
Convert an integer to an uppercase letter starting with A = 1; things outside the range 1 to 26 give spaces. Deeply vectorizes.
UlStability: alpha
Aliases:
Unless
Single-branch unless.
UnconsStability: beta
Golf as:
(
Split into tail and first.
[1 2 3]Uncons => [2 3]1
Under_zero_or_is_uniqueStability: beta
Aliases:
Û
Under zero or Unique (test)
UniqueStability: beta
Golf as:
Û
UniquifyStability: alpha
Golf as:
U
Uniquify a sequence: drop all but first occurrence of each element
UnlessStability: alpha
Aliases:
Ul
Single-branch unless.
UnrotateStability: alpha
Aliases:
Ur
Rotate a matrix, or list of lists, 90 degrees clockwise (just by vague mathematical convention of angle).
UnsnocStability: beta
Golf as:
)
Split into init and last.
[1 2 3]Uncons => [1 2]3
UntilStability: alpha
Golf as:
U
Until loop: Execute first block, pop, stop if true, execute second block, repeat.
UpStability: beta
Aliases:
Is_upper
Tests if characters are uppercase. Deeply vectorizes.
Upper_baseStability: beta
Aliases:
Ub
Converts the first number to a string of digits in the radix of the second, using uppercase digits. Deeply vectorizes over the first.
Upper_of_intStability: unstable
Aliases:
Ui
Convert an integer to an uppercase letter starting with A = 1; things outside the range 1 to 26 give spaces. Deeply vectorizes.
UppercaseStability: beta
Aliases:
Uc
Converts all characters to uppercase. Deeply vectorizes.
UrStability: alpha
Aliases:
Unrotate
Rotate a matrix, or list of lists, 90 degrees clockwise (just by vague mathematical convention of angle).
VStability: alpha
Aliases:
Read_input
Read something from standard input, as determined by the current input trigger.
Value_of_characterStability: alpha
Aliases:
Vc
Finds the "value" of a character: digits give their numeric value, - and < give -1, + and > give +1, everything else gives 0. Deeply vectorizes.
VcStability: alpha
Aliases:
Value_of_character
Finds the "value" of a character: digits give their numeric value, - and < give -1, + and > give +1, everything else gives 0. Deeply vectorizes.
WStability: alpha
Aliases:
Window_or_words_or_while
Words (split by spaces) or Window (sliding window of size given by number) or While loop.
WhileStability: alpha
Golf as:
W
While loop: Execute first block, pop, break if false, execute second block, repeat.
WindowStability: alpha
Golf as:
W
Window_or_words_or_whileStability: alpha
Aliases:
W
Words (split by spaces) or Window (sliding window of size given by number) or While loop.
WordsStability: alpha
Golf as:
W
WpStability: alpha
Aliases:
Is_space
Tests if characters are whitespace. Deeply vectorizes.
XaStability: unstable
Aliases:
Regex_array
Take a string and a regex, and find all matches (this is Python's re.finditer, and its caveats apply.) Returns a list with one list for each match; each list consists of the string matched by the regex followed by all of the regex's groups.
XcStability: alpha
Aliases:
Exchange_case
Swaps the case of all characters. Deeply vectorizes.
XmStability: unstable
Aliases:
Regex_match
Take a string and a regex, and attempt to match the regex exactly against the entire string. Returns a list consisting of the string matched by the regex followed by all of the regex's groups, or an empty list if no match is found (so the truthiness of the result is whether a match is found).
XsStability: unstable
Aliases:
Regex_search
Take a string and a regex, and perform a regex search through the string. Returns a list consisting of the string matched by the regex followed by all of the regex's groups, or an empty list if no match is found (so the truthiness of the result is whether a match is found).
YaStability: unstable
Aliases:
Mismatch_former, Yf
Given two sequences, find the first element in the first sequence that isn't at the corresponding index in the second. Errors if there isn't such an element. Mnemonic for this and related operations: Y is a fork where the bottom is the shared prefix and the top are the diverging suffixes; 'f' is for 'former' / 'a' is the first letter of the alphabet.
YbStability: unstable
Aliases:
Mismatch_latter, Yl
Given two sequences, find the first element in the second sequence that isn't at the corresponding index in the second. Errors if there isn't such an element. Mnemonic for this and related operations: Y is a fork where the bottom is the shared prefix and the top are the diverging suffixes; 'l' is for 'latter' / 'b' is the second letter of the alphabet.
YdStability: alpha
Aliases:
Mismatch_suffixes
Find the suffixes after the longest prefix shared between two sequences. Mnemonic for this and related operations: Y is a fork where the bottom is the shared prefix and the top are the diverging suffixes. 'd' is for different or diverging.
YfStability: unstable
Aliases:
Mismatch_former, Ya
Given two sequences, find the first element in the first sequence that isn't at the corresponding index in the second. Errors if there isn't such an element. Mnemonic for this and related operations: Y is a fork where the bottom is the shared prefix and the top are the diverging suffixes; 'f' is for 'former' / 'a' is the first letter of the alphabet.
YiStability: alpha
Aliases:
Mismatch_index
Find the length of the longest prefix shared between two sequences; equivalently, the index of the first element where they diverge, except that it'll be the length of the list if they are identical. Mnemonic for this and related operations: Y is a fork where the bottom is the shared prefix and the top are the diverging suffixes; 'i' is for index.
YlStability: unstable
Aliases:
Mismatch_latter, Yb
Given two sequences, find the first element in the second sequence that isn't at the corresponding index in the second. Errors if there isn't such an element. Mnemonic for this and related operations: Y is a fork where the bottom is the shared prefix and the top are the diverging suffixes; 'l' is for 'latter' / 'b' is the second letter of the alphabet.
YmStability: alpha
Aliases:
Matching_prefix, Shared_prefix, Ys
Find the longest prefix shared between two sequences. Mnemonic for this and related operations: Y is a fork where the bottom is the shared prefix and the top are the diverging suffixes. 's' is for same or shared.
YpStability: alpha
Aliases:
Mismatch_pair
Find the first elements after the longest prefix shared between two sequences. Returns a list. If the two sequences are equal, the list will be empty. If one sequence is a proper prefix of the other, the list will just have one element (and you won't be able to tell which sequence it came from). Mnemonic for this and related operations: Y is a fork where the bottom is the shared prefix and the top are the diverging suffixes; 'p' is for pair, which the return value usually is.
YsStability: alpha
Aliases:
Matching_prefix, Shared_prefix, Ym
Find the longest prefix shared between two sequences. Mnemonic for this and related operations: Y is a fork where the bottom is the shared prefix and the top are the diverging suffixes. 's' is for same or shared.
Zero_fillStability: unstable
Aliases:
Zf
Given a value and a length, convert the value to a string if necessary and left-pad it with zeroes until at least the length.
ZfStability: unstable
Aliases:
Zero_fill
Given a value and a length, convert the value to a string if necessary and left-pad it with zeroes until at least the length.
ZipStability: alpha
Aliases:
Zp
Zip two sequences (numbers coerce to ranges), returning a
list of length-2 lists; or zip them with a block, which operates on
corresponding pairs of the two lists. Truncates to the length of
the shorter input sequence. Also see _zip, and
‰ for an alias.
ZiplongestStability: alpha
Aliases:
Zl
Zip two sequences (numbers coerce to ranges), returning a list of length-2 or (at indices between their lengths, if the sequences are of unequal length) length-1 lists; or zip them with a block, which operates on corresponding pairs of the two lists, where elements of the longer list are collected unmodified. The result has length equal to that of the longest list.
ZlStability: alpha
Aliases:
Ziplongest
Zip two sequences (numbers coerce to ranges), returning a list of length-2 or (at indices between their lengths, if the sequences are of unequal length) length-1 lists; or zip them with a block, which operates on corresponding pairs of the two lists, where elements of the longer list are collected unmodified. The result has length equal to that of the longest list.
ZpStability: alpha
Aliases:
Zip
Zip two sequences (numbers coerce to ranges), returning a
list of length-2 lists; or zip them with a block, which operates on
corresponding pairs of the two lists. Truncates to the length of
the shorter input sequence. Also see _zip, and
‰ for an alias.
ZtStability: alpha
Aliases:
Translate
Translate the first argument using a mapping obtained by zipping the second and third, mapping elements of the second to elements of the third, repeating the last element of the third as necessary.
[Stability: stable
Aliases:
Mark
Mark the stack.
[fStability: unstable
Aliases:
Left_fill
Given a list (numbers coerce to ranges), a length, and a filler object, left-pad the list with the filler object until at least the length.
\Stability: stable
Aliases:
Swap
Swap the top two elements of the stack.
1 2 3\ => 1 3 2
\aStability: alpha
Aliases:
Swap_around
Swap the first and third elements of the stack (swap "around" the second one).
1 2 3\a => 3 2 1
\iStability: beta
Aliases:
Swap_in
Rotate the top three elements of the stack so that the top is now on bottom ("inward" by two): a b c -> c a b
1 2 3\i => 3 1 2
\jStability: alpha
Swap the real and imaginary part. Deeply vectorizes.
\nbStability: alpha
Aliases:
Line_split, Lines, Line_break, NEWLINEb
Split by a single newline.
\nmStability: alpha
Aliases:
Map_on_lines, NEWLINEm
Map on lines: takes a block and a string, split the string into lines, map the block over the tokens, then join the tokens with a linebreak.
\noStability: beta
Aliases:
Newline_output, NEWLINEo
Output a newline.
\npStability: beta
Aliases:
Newline_print, NEWLINEp
Output a newline, followed by an output record separator.
\nrStability: beta
Join with newlines
\nxStability: alpha
Aliases:
Newline_repeat, NEWLINEx
\oStability: beta
Aliases:
Swap_out
Rotate the top three elements of the stack so that the 3rd from the top is now on top ("outward" by two): a b c -> b c a
1 2 3\o => 2 3 1
]Stability: stable
Aliases:
Pack
Pack the elements above the last stack mark into a list.
]_caseStability: beta
Aliases:
]c
Case statement: Takes a series of lists, the "cases", above the last stack mark, as well as one object, the "target", below the mark, which is popped. Then, find the first "case" such that the case "matches" the target, where "matches" means that if the case's first element is a block then the target must satisfy it, and otherwise they must be equal. Push or execute all remaining list elements in that first matching case.
]_checkStability: alpha
Stack check: Takes a series of case predicates above the last stack mark. Peek at the same number of objects on the same stack below them. Assert that every object matches the corresponding predicate; otherwise, halt the program.
]_streamStability: alpha
Aliases:
]s
Stream case statement: Like the case statement, but just takes a series of alternative case predicates and case bodies instead of expecting them to be paired up.
]cStability: beta
Aliases:
]_case
Case statement: Takes a series of lists, the "cases", above the last stack mark, as well as one object, the "target", below the mark, which is popped. Then, find the first "case" such that the case "matches" the target, where "matches" means that if the case's first element is a block then the target must satisfy it, and otherwise they must be equal. Push or execute all remaining list elements in that first matching case.
]fStability: unstable
Aliases:
Right_fill
Given a list (numbers coerce to ranges), a length, and a filler object, right-pad the list with the filler object until at least the length.
]sStability: alpha
Aliases:
]_stream
Stream case statement: Like the case statement, but just takes a series of alternative case predicates and case bodies instead of expecting them to be paired up.
^Stability: beta
Aliases:
Exclusive_or_or_symmetric_difference_or_find_last
Binary XOR on numbers. Symmetric difference on sequences. Find last on block and sequence.
^jStability: unstable
Aliases:
Imaginary_unit_power, ˆj
Take the power of the imaginary unit to this number. Deeply vectorizes.
`Stability: beta
Aliases:
Repr
Push the string Paradoc representation of the top element.
|Stability: beta
Aliases:
Bin_or_or_union_or_unless
Binary OR on numbers. Union on sequences. One-branch unless on blocks.
|jStability: unstable
Aliases:
Negate_real
Negate the real part. Deeply vectorizes. Mnemonic: reflect this across the vertical y-axis on the complex plane. (Really really unstable.)
|pStability: beta
Aliases:
Boolean_or
Takes two arguments, leaves the first if the first is falsy and the second if the first is truthy.
~Stability: beta
Aliases:
Compl_or_eval_or_expand
Bitwise complement of integers. Expand lists or strings onto the stack, pushing each element separately in order. Eval on a block.
~jStability: unstable
Aliases:
Complex_components
Real and imaginary part, as two elements on the stack. Mnemonic: Treating the complex number as a length-2 list, this expands it like ~.
~pStability: alpha
Aliases:
Complement_parity
NBSPStability: alpha
Utility constant: space
¡Stability: beta
Aliases:
Permutations_or_factorial, !p
¢Stability: alpha
Aliases:
Order_statistic
Order statistic (zero-indexed)
¤Stability: alpha
Aliases:
Round_or_first_and_last
¥Stability: unstable
Bimask. Mnemonics: like € but it
"forks" the sequence into two instead of just having the truthy
ones.
¦Stability: beta
Duplicate the top two elements of the stack: a b -> a b a b
1 2 3 :p => 1 2 3 2 3
§Stability: unstable
Aliases:
All_slices, =s
All slices of a sequence (numbers coerce to ranges).
¨Stability: beta
Aliases:
Exclusive_range_or_flatten_once
«Stability: beta
Aliases:
Decr_two_or_but_last
Decrease by two, or all but last
«pStability: unstable
Aliases:
Left_add
Given a list (numbers coerce to ranges), a number, and a filler object, left-pad the list with number copies of the filler object.
«sStability: alpha
Aliases:
From_empty_left_slices
Left slices (including the empty one, by increasing length)
¬Stability: stable
Aliases:
Pack_reverse, Pack_down
Pack the elements above the last stack mark into a list in reverse order.
[1 2 3¬ => [3 2 1]
¯Stability: beta
Aliases:
Antiminus
Reversed subtraction. Compare
Minus_or_reject.
°Stability: beta
Make a list by repeating an element some number of times.
±Stability: stable
Absolute difference. Mnemonic: + is for "positive" and - is for "difference".
²Stability: beta
Aliases:
Square
Square a number, or compute the Cartesian product of a sequence with itself, or map a block across that.
³Stability: beta
Aliases:
Cube
Cube a number, or compute the Cartesian product of three copies of a sequence.
´Stability: unstable
Aliases:
Range_len_keep
Range on numbers; range of indices of sequence. Keeps the operand on the stack! Mnemonic: looks like a comma, except it's higher, so the stack will be taller after running it.
¶Stability: alpha
Test if this is prime.
·Stability: alpha
Aliases:
Assign_bullet
Assign to the variable •
¸Stability: beta
Aliases:
Pop_under
Pop the second from the top element of the stack.
1 2 3¸ => 1 3
¹Stability: unstable
Utility constant: eleven
Integer constant with value 11
»Stability: beta
Aliases:
Incr_two_or_but_first
Increase by two, or all but first (tail)
»pStability: unstable
Aliases:
Right_add
Given a list (numbers coerce to ranges), a number, and a filler object, right-pad the list with number copies of the filler object.
»sStability: alpha
Aliases:
From_empty_right_slices
Right slices (including the empty one, by increasing length)
¼Stability: alpha
Aliases:
Quarter
½Stability: alpha
Aliases:
Halve
¾Stability: alpha
Aliases:
Three_quarters
¿Stability: beta
Aliases:
Subsequences, Ss
ÀStability: unstable
Aliases:
Minus_deep_vectorizing
Subraction on numbers; deeply vectorizes.
ÁStability: unstable
Aliases:
Plus_deep_vectorizing
Addition on numbers; deeply vectorizes.
ÂStability: beta
Aliases:
Above_zero_or_all
Above zero or All
ÃStability: beta
Maximum of two values, optionally by a block
ÃwStability: unstable
Aliases:
Max_deep_vectorizing, >mw
Maximum of two values; deeply vectorizes.
ÅStability: alpha
Uppercase alphabet alias
String constant with value 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ÅaStability: alpha
String constant with value 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
ÅbStability: alpha
String constant with value 'BCDFGHJKLMNPQRSTVWXZbcdfghjklmnpqrstvwxz'
ÅcStability: alpha
String constant with value 'BCDFGHJKLMNPQRSTVWXYZbcdfghjklmnpqrstvwxyz'
ÅdStability: alpha
String constant with value '9876543210'
ÅfStability: alpha
String constant with value 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
ÅhStability: alpha
String constant with value '0123456789ABCDEF'
ÅiStability: alpha
String constant with value 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_'
ÅjStability: alpha
String constant with value 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'
ÅlStability: alpha
String constant with value 'zyxwvutsrqponmlkjihgfedcba'
ÅmStability: alpha
String constant with value '()<>[]{}'
ÅpStability: alpha
String constant with value ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~'
ÅqStability: alpha
String constant with value 'QWERTYUIOPqwertyuiop'
ÅsStability: alpha
String constant with value 'ASDFGHJKLasdfghjkl'
ÅtStability: alpha
String constant with value '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ÅuStability: alpha
String constant with value 'ZYXWVUTSRQPONMLKJIHGFEDCBA'
ÅvStability: alpha
String constant with value 'AEIOUaeiou'
ÅxStability: alpha
String constant with value 'ZXCVBNMzxcvbnm'
ÅyStability: alpha
String constant with value 'AEIOUYaeiouy'
ÅzStability: alpha
String constant with value 'zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA'
ÆStability: beta
Maximum of array, optionally by a block (numbers will coerce to ranges if you supply a block). Mnemonic: it's like reducing by maximum of two values.
ÆsStability: alpha
Aliases:
Array_maxima, >rs
Maxima of array, optionally by a block (numbers will coerce to ranges if you supply a block).
ÇStability: unstable
Unstable alias for Binomial_coefficient.
ÈStability: alpha
Aliases:
Square_deep
Square of numbers. Deeply vectorizes.
ÉStability: alpha
Aliases:
Two_power_vectorizing
Two to the power of numbers. Deeply vectorizes.
ÊStability: beta
Aliases:
Even_or_any
Even or Any (Exists)
ÌStability: alpha
Aliases:
Negate_deep
Negate numbers. Deeply vectorizes.
ÍStability: alpha
Aliases:
Inverse
Inverse (reciprocal) of numbers. Deeply vectorizes.
ÎStability: beta
Aliases:
Equals_one_or_identical
Identity (equals 1) or Identical
ÐStability: alpha
Aliases:
Reverse_one_or_map
On numbers, reverse inclusive range from that number to
1 (i.e. Range_one_down). On sequences, reverse each element
(numbers coerce to length-1 lists, and characters coerce to
length-1 strings, so you can also use this to wrap each element of
a flat list into a list). (Heavily inspired by studying
05AB1E.)
ÑStability: stable
Output field separator
String constant with value ''
ÒStability: unstable
Aliases:
Divide_deep_vectorizing
Division on numbers; deeply vectorizes.
ÓStability: unstable
Aliases:
Multiply_deep_vectorizing
Multiplication on numbers; deeply vectorizes.
ÔStability: beta
Aliases:
Odd_or_not_any
Odd or Not_any
ÕStability: beta
Minimum of two values, optionally by a block
ÕwStability: unstable
Aliases:
Min_deep_vectorizing, <mw
Minimum of two values; deeply vectorizes.
×Stability: beta
Aliases:
Double
ØStability: alpha
Aliases:
Organize_or_totient
On numbers, Euler's Totient function (does not
vectorize). On sequences or blocks with sequences, Organize.
ÚStability: unstable
Aliases:
Modulus_deep_vectorizing
Modulus on numbers; deeply vectorizes.
ÛStability: beta
Aliases:
Under_zero_or_is_unique
Under zero or Unique (test)
ÞStability: alpha
(Deep) product (coerces numbers to range!?).
ÞsStability: beta
Aliases:
Product_stack
÷Stability: beta
Aliases:
Intdiv_or_split_discard
Integer division on numbers. On a sequence and number, split the sequence into chunks of size equal to the number, discarding leftovers.
[1 2 3 4]2/ => [[1 2][3 4]] [1 2 3 4 5]2/ => [[1 2][3 4]]
ŊStability: unstable
Aliases:
^N
Unstable aliases for Line_join.
ŒStability: beta
Minimum of array, optionally by a block (numbers will coerce to ranges if you supply a block). Mnemonic: it's like reducing by minimum of two values.
ŒsStability: alpha
Aliases:
Array_minima, <rs
Minima of array, optionally by a block (numbers will coerce to ranges if you supply a block).
ŠStability: beta
(Deep) sum (coerces numbers to range).
ŠsStability: beta
Aliases:
Sum_stack
ƤStability: unstable
Pop something, output to standard output followed by an
output record separator, then push it back. Pretty much just Print__keep.
ˆStability: beta
On numbers, power/exponentiate. On a list and a number, exponentiate the list by making a list of all lists of that length composed of elements from the original list (possibly repeating).
ˆjStability: unstable
Aliases:
Imaginary_unit_power, ^j
Take the power of the imaginary unit to this number. Deeply vectorizes.
˜Stability: alpha
Compare (-1, 0, or 1)
αStability: unstable
Integer constant with value 1
–Stability: alpha
Aliases:
Assign_bullet_destructive
Pop and assign to the variable •
†Stability: stable
Pack the top element of the stack into a list by itself.
ASCII alternative: 1_array; see _array.
1 2 3† => 1 2 [3]
‡Stability: stable
Pack the top two elements of the stack into a list.
ASCII alternative: 2_array; see _array.
1 2 3‡ => 1 [2 3]
•Stability: alpha
A utility variable assigned to by Assign_bullet
and Assign_bullet_destructive. Initialized to a new
hoard.
…Stability: beta
Aliases:
Inclusive_range_or_flatten
‰Stability: unstable
Aliases:
Divmod_or_zip, %p
On integers, integer division and modulus. On two sequences
or a block and two sequences, Zip.
‹Stability: beta
Aliases:
Floor_or_first
Floor or First of sequence or
Modify_first
‹pStability: unstable
Aliases:
Left_add_spaces
Given a value and a length, convert the value to a string if necessary and prepend that many spaces. Mnemonic: well, left-pad (but "fill" doesn't make sense unless you're filling up to something, whereas padding still makes sense.)
›Stability: beta
Aliases:
Ceiling_or_last
Ceiling or Last of sequence or
Modify_last
›pStability: unstable
Aliases:
Right_add_spaces
Given a value and a length, convert the value to a string if necessary and append that many spaces. Mnemonic: well, right-pad (but "fill" doesn't make sense unless you're filling up to something, whereas padding still makes sense.)
€Stability: unstable
Power_of_ten or Mask. Mnemonics: E for
exponent, the one in scientific notation, or the powers of ten in
the relatively European metric system; or € has the = like
indexing; it's indexing by a list of booleans.
™Stability: beta
Transpose a matrix, or list of lists. Mnemonic: matrices are transposed by a superscript T, so Tt is just that "doubled" and ™ is "Transpose Matrix" superscripted.
∅Stability: unstable
␣Stability: alpha
Utility constant: space