Paradoc Documentation and Built-Ins

Version 0.6

Table of Contents

Introduction

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

Usage

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"

Design Philosophy

In decreasing order of importance:

Differences from GolfScript/CJam

Syntax

There are also global trailers, which come right at the start of the program. These haven't been documented yet, sorry.

Semantics

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.

Marks

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.

The X-Stack

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.

Input

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.

Hoards

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.

Mnemonics

Stability

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:

The ids of elements on this page should be considered unstable, so permalinks to this page should be considered unstable as well.

Built-in/Trailer Overview

A brief, incomplete categorized list of built-ins and trailers, useful for golf, and related golf tips.

Block Trailers

_

Stability: stable

Aliases: _reluctant

Make this block reluctant: push it instead of executing it.

_a

Stability: alpha

Aliases: _anti

Swap the top two elements of the stack before running this block. Makes the result reluctant.

_all

Stability: alpha

Aliases:

Apply this block to each element of a list (coerces numbers to ranges); push whether at least one result is truthy.

_anti

Stability: alpha

Aliases: _a

Swap the top two elements of the stack before running this block. Makes the result reluctant.

_any

Stability: alpha

Aliases: _exists,

Apply this block to each element of a list (coerces numbers to ranges); push whether at least one result is truthy.

_autozip

Stability: beta

Aliases: _az,

Execute this block once for each adjacent pair of elements from a list (coerces numbers to ranges). Both elements are pushed onto the stack.

_az

Stability: beta

Aliases: _autozip,

Execute this block once for each adjacent pair of elements from a list (coerces numbers to ranges). Both elements are pushed onto the stack.

_b

Stability: 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.

_bind

Stability: 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.

_bindmap

Stability: 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]]

_boundary

Stability: 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).

_count

Stability: alpha

Aliases:

Apply this block to each element of a list (coerces numbers to ranges); push the number of truthy results.

_countdistinct

Stability: 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.

_countnot

Stability: unstable

Aliases: ,

Apply this block to each element of a list (coerces numbers to ranges); push the number of falsy results.

_d

Stability: 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

_deepmap

Stability: alpha

Aliases: _walk, _w

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.

_double

Stability: 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

_e

Stability: stable

Aliases: _each

Apply this block to each element of a list (coerces numbers to ranges). Compare _xloop.

_each

Stability: stable

Aliases: _e

Apply this block to each element of a list (coerces numbers to ranges). Compare _xloop.

_enumap

Stability: alpha

Aliases:

Apply this block to each index and element of a list (coerces numbers to ranges); collect the results into a new list.

_exists

Stability: alpha

Aliases: _any,

Apply this block to each element of a list (coerces numbers to ranges); push whether at least one result is truthy.

_f

Stability: stable

Aliases: _filter, _select

Apply this block to each element of a list (coerces numbers to ranges) and filter elements for which the block gives a truthy result.

_filter

Stability: stable

Aliases: _select, _f

Apply this block to each element of a list (coerces numbers to ranges) and filter elements for which the block gives a truthy result.

_fold

Stability: beta

Aliases: _reduce, _r

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

_g

Stability: beta

Aliases: _get

Find the first element of the list where this block gives a truthy result (coerces numbers to ranges).

_get

Stability: beta

Aliases: _g

Find the first element of the list where this block gives a truthy result (coerces numbers to ranges).

_h

Stability: unstable

Aliases: _high

Find the last index of the list where this block gives a truthy result (coerces numbers to ranges).

_high

Stability: unstable

Aliases: _h

Find the last index of the list where this block gives a truthy result (coerces numbers to ranges).

_i

Stability: unstable

Aliases: _index

Find the first index of the list where this block gives a truthy result (coerces numbers to ranges).

_index

Stability: unstable

Aliases: _i

Find the first index of the list where this block gives a truthy result (coerces numbers to ranges).

_j

Stability: 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.

_k

Stability: 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

_keep

Stability: 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

_keepunder

Stability: 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

_l

Stability: unstable

Aliases: _last

Find the last index of the list where this block gives a truthy result (coerces numbers to ranges).

_last

Stability: unstable

Aliases: _l

Find the last index of the list where this block gives a truthy result (coerces numbers to ranges).

_loop

Stability: alpha

Loop this block forever (until an error is thrown).

_loopzip

Stability: 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.

_m

Stability: stable

Aliases: _map

Apply this block to each element of a list (coerces numbers to ranges); collect the results into a new list.

_map

Stability: stable

Aliases: _m

Apply this block to each element of a list (coerces numbers to ranges); collect the results into a new list.

_mapbind

Stability: 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.

_mapproduct

Stability: alpha

Aliases: _product, _prod,

Apply this block to each element of a list (coerces numbers to ranges); take the deep product of the results.

_mapsum

Stability: alpha

Aliases: _sum,

Apply this block to each element of a list (coerces numbers to ranges); deeply sum the results.

_max

Stability: alpha

Aliases:

Apply this block to each element of a list and return the element for which the block's result is maximum.

_min

Stability: alpha

Aliases:

Apply this block to each element of a list and return the element for which the block's result is minimum.

_none

Stability: alpha

Aliases:

Apply this block to each element of a list (coerces numbers to ranges); push whether all results are falsy.

_o

Stability: 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.

_onemap

Stability: 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.

_org

Stability: alpha

Aliases: _organize,

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.

_organize

Stability: alpha

Aliases: _org,

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.

_prod

Stability: alpha

Aliases: _mapproduct, _product,

Apply this block to each element of a list (coerces numbers to ranges); take the deep product of the results.

_product

Stability: alpha

Aliases: _mapproduct, _prod,

Apply this block to each element of a list (coerces numbers to ranges); take the deep product of the results.

_q

Stability: 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

_r

Stability: beta

Aliases: _reduce, _fold

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

_reduce

Stability: beta

Aliases: _fold, _r

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

_reject

Stability: 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.

_reluctant

Stability: stable

Aliases: _

Make this block reluctant: push it instead of executing it.

_s

Stability: 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]

_scan

Stability: 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]

_select

Stability: stable

Aliases: _filter, _f

Apply this block to each element of a list (coerces numbers to ranges) and filter elements for which the block gives a truthy result.

_sum

Stability: alpha

Aliases: _mapsum,

Apply this block to each element of a list (coerces numbers to ranges); deeply sum the results.

_u

Stability: 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

_under

Stability: 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

_unemap

Stability: unstable

Aliases:

Apply this block to each element and index of a list (coerces numbers to ranges); collect the results into a new list.

_v

Stability: 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]]

_vectorize

Stability: beta

Aliases: _bindmap, _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]]

_w

Stability: alpha

Aliases: _deepmap, _walk

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.

_walk

Stability: alpha

Aliases: _deepmap, _w

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.

_x

Stability: 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 *.

_xloop

Stability: 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 *.

_y

Stability: 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.

_z

Stability: 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.

_zip

Stability: 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.

_ziplongest

Stability: 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

Aliases: _autozip, _az

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

Aliases: _exists, _any

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

Aliases: _countnot,

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

Aliases: _organize, _org

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

Aliases: _mapsum, _sum

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

Aliases: _countnot,

Apply this block to each element of a list (coerces numbers to ranges); push the number of falsy results.

String Trailers

_

Stability: alpha

Aliases: _reluctant

Convert to a reluctant block that pushes this string.

_debug

Stability: beta

Print debugging information about the contents of the stack.

_f

Stability: alpha

Aliases: _format

Formats elements on the stack with Python % formatting. If no % sign is in the string, prepends a %.

_format

Stability: alpha

Aliases: _f

Formats elements on the stack with Python % formatting. If no % sign is in the string, prepends a %.

_i

Stability: alpha

Aliases: _interpolate

Interpolate elements on the stack into % signs in this string.

_iftrue

Stability: unstable

Aliases: _t

Pop an element; push this string if it's truthy, and an empty string if not.

_interoutput

Stability: alpha

Aliases: _o

Interpolate elements on the stack into % signs in this string, then outputs the result.

_interpolate

Stability: alpha

Aliases: _i

Interpolate elements on the stack into % signs in this string.

_interprint

Stability: alpha

Aliases: _p

Interpolate elements on the stack into % signs in this string, then outputs the result followed by an output record separator.

_o

Stability: alpha

Aliases: _interoutput

Interpolate elements on the stack into % signs in this string, then outputs the result.

_p

Stability: alpha

Aliases: _interprint

Interpolate elements on the stack into % signs in this string, then outputs the result followed by an output record separator.

_reluctant

Stability: alpha

Aliases: _

Convert to a reluctant block that pushes this string.

_t

Stability: unstable

Aliases: _iftrue

Pop an element; push this string if it's truthy, and an empty string if not.

Int Trailers

_

Stability: alpha

Aliases: _reluctant

Convert to a reluctant block that pushes this number.

_a

Stability: beta

Aliases: _array

Pop some number of elements and push them back in a new array.

_array

Stability: beta

Aliases: _a

Pop some number of elements and push them back in a new array.

_b

Stability: unstable

Aliases: _bits

Convert to list of bits.

_bits

Stability: unstable

Aliases: _b

Convert to list of bits.

_d

Stability: unstable

Aliases: _digits

Convert to list of digits.

_delete

Stability: 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.

_digits

Stability: unstable

Aliases: _d

Convert to list of digits.

_f

Stability: 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.

_force

Stability: 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.

_g

Stability: unstable

Aliases: _get

Index into a sequence.

_get

Stability: unstable

Aliases: _g

Index into a sequence.

_h

Stability: stable

Aliases: _hundred

Multiply by a hundred.

_hundred

Stability: stable

Aliases: _h

Multiply by a hundred.

_i

Stability: unstable

Aliases: _in

Move the top element of the stack to position n (zero-indexed, so below n other elements.)

_imag

Stability: unstable

Aliases: _j

Imaginary number.

_in

Stability: unstable

Aliases: _i

Move the top element of the stack to position n (zero-indexed, so below n other elements.)

_j

Stability: unstable

Aliases: _imag

Imaginary number.

_k

Stability: stable

Aliases: _thousand

Multiply by a thousand.

_l

Stability: unstable

Aliases: _last

Index from the end of a sequence.

_last

Stability: unstable

Aliases: _l

Index from the end of a sequence.

_m

Stability: stable

Aliases: _minus

Negate.

_minus

Stability: stable

Aliases: _m

Negate.

_o

Stability: unstable

Aliases: _out

Move the nth element of the stack (zero-indexed, so the element below n other elements) to the top.

_out

Stability: unstable

Aliases: _o

Move the nth element of the stack (zero-indexed, so the element below n other elements) to the top.

_p

Stability: beta

Aliases: _power

Raise something to this power.

_power

Stability: beta

Aliases: _p

Raise something to this power.

_pushbits

Stability: unstable

Aliases:

Interpret this number in binary and push the bits of this number (directly onto the stack in order).

_pushdigits

Stability: unstable

Aliases:

Push the digits of this number (directly onto the stack in order).

_q

Stability: 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.

_quarter

Stability: 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.

_r

Stability: alpha

Aliases: _root

Take the nth root.

_reluctant

Stability: alpha

Aliases: _

Convert to a reluctant block that pushes this number.

_root

Stability: alpha

Aliases: _r

Take the nth root.

_thousand

Stability: stable

Aliases: _k

Multiply by a thousand.

_u

Stability: alpha

Aliases: _under

Push under the top element.

_under

Stability: alpha

Aliases: _u

Push under the top element.

_x

Stability: 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.

_z

Stability: beta

Aliases: _zip

Pop some number of elements and zip them together.

_zip

Stability: 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.

Float Trailers

_

Stability: alpha

Aliases: _reluctant

Convert to a reluctant block that pushes this number.

_h

Stability: alpha

Aliases: _hundred

Multiply by a hundred.

_hundred

Stability: alpha

Aliases: _h

Multiply by a hundred.

_k

Stability: alpha

Aliases: _thousand

Multiply by a thousand.

_m

Stability: stable

Aliases: _minus

Negate.

_minus

Stability: stable

Aliases: _m

Negate.

_reluctant

Stability: alpha

Aliases: _

Convert to a reluctant block that pushes this number.

_thousand

Stability: alpha

Aliases: _k

Multiply by a thousand.

Hoard Trailers

_a

Stability: alpha

Aliases: _append

Append (to the right).

_append

Stability: alpha

Aliases: _a

Append (to the right).

_appendback

Stability: alpha

Aliases: _appendleft, _b

Append to the left, aka back.

_appendleft

Stability: alpha

Aliases: _appendback, _b

Append to the left, aka back.

_b

Stability: alpha

Aliases: _appendleft, _appendback

Append to the left, aka back.

_c

Stability: alpha

Aliases: _copy

Copy into a new Hoard.

_copy

Stability: alpha

Aliases: _c

Copy into a new Hoard.

_d

Stability: alpha

Aliases: _delete

Delete a key

_delete

Stability: alpha

Aliases: _d

Delete a key

_eject

Stability: unstable

Aliases: _j

Push a list copy of the hoard, then clear the hoard.

_extend

Stability: unstable

Aliases: _x

Extend (with a sequence, to the right).

_g

Stability: alpha

Aliases: _get

Get a key with a default value if the key is not found

_get

Stability: alpha

Aliases: _g

Get a key with a default value if the key is not found

_getzero

Stability: unstable

Aliases: _z

Get value at a key with 0 as default is the key is not found

_h

Stability: unstable

Aliases: _haskey

Test if a key exists

_haskey

Stability: unstable

Aliases: _h

Test if a key exists

_j

Stability: unstable

Aliases: _eject

Push a list copy of the hoard, then clear the hoard.

_k

Stability: unstable

Get list of keys

_l

Stability: alpha

Aliases: _list

To list

_list

Stability: alpha

Aliases: _l

To list

_m

Stability: 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.)

_modify

Stability: 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.)

_o

Stability: unstable

Aliases: _updateone

Put 1 at a key

_p

Stability: alpha

Aliases: _pop

Pop (from the right).

_pop

Stability: alpha

Aliases: _p

Pop (from the right).

_popleft

Stability: alpha

Aliases: _q

Pop from the left. Dequeue, perhaps.

_q

Stability: alpha

Aliases: _popleft

Pop from the left. Dequeue, perhaps.

_r

Stability: alpha

Aliases: _replace

Completely replace data.

_replace

Stability: alpha

Aliases: _r

Completely replace data.

_t

Stability: unstable

Aliases: _translate

Translate a list through looking up keys, with default 0 (coerces numbers to ranges).

_translate

Stability: unstable

Aliases: _t

Translate a list through looking up keys, with default 0 (coerces numbers to ranges).

_u

Stability: alpha

Aliases: _update

Update at an index or key.

_update

Stability: alpha

Aliases: _u

Update at an index or key.

_updateone

Stability: unstable

Aliases: _o

Put 1 at a key

_x

Stability: unstable

Aliases: _extend

Extend (with a sequence, to the right).

_z

Stability: unstable

Aliases: _getzero

Get value at a key with 0 as default is the key is not found

Built-Ins

^@

Stability: unstable

^A

Stability: unstable

Integer constant with value 1

TAB

Stability: stable

Aliases: Nop, SPACE, NEWLINE, RETURN

Do nothing.

NEWLINE

Stability: stable

Aliases: Nop, SPACE, TAB, RETURN

Do nothing.

NEWLINEb

Stability: alpha

Aliases: Line_split, Lines, Line_break, \nb

Split by a single newline.

NEWLINEm

Stability: 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.

NEWLINEo

Stability: beta

Aliases: Newline_output, \no

Output a newline.

NEWLINEp

Stability: beta

Aliases: Newline_print, \np

Output a newline, followed by an output record separator.

NEWLINEr

Stability: beta

Aliases: Line_join, \nr

Join with newlines

NEWLINEx

Stability: alpha

Aliases: Newline_repeat, \nx

RETURN

Stability: stable

Aliases: Nop, SPACE, TAB, NEWLINE

Do nothing.

^N

Stability: unstable

Aliases: Ŋ

Unstable aliases for Line_join.

^P

Stability: unstable

Aliases: Printkeep, Ƥ

Pop something, output to standard output followed by an output record separator, then push it back. Pretty much just Print__keep.

SPACE

Stability: stable

Aliases: Nop, TAB, NEWLINE, RETURN

Do nothing.

SPACEb

Stability: 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.

SPACEm

Stability: 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.

SPACEo

Stability: beta

Aliases: Space_output

Output a space.

SPACEq

Stability: 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.

SPACEr

Stability: beta

Aliases: Space_join

SPACEt

Stability: 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.

SPACEx

Stability: 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).

!j

Stability: unstable

Aliases: Not_imaginary

Test if the imaginary part is zero. Deeply vectorizes.

!p

Stability: 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

#p

Stability: 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

$p

Stability: 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"]

%p

Stability: 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.

&j

Stability: unstable

Aliases: Pure_imaginary, ?j

Test if the real part is zero. Deeply vectorizes.

&p

Stability: 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.

(p

Stability: alpha

Aliases: Prev_prime

Find the largest prime smaller than this.

(s

Stability: beta

Aliases: Butlast

All but last of sequence

)

Stability: beta

Aliases: Incr_or_unsnoc_or_modify_last

Incr or Unsnoc or Modify_last.

)p

Stability: alpha

Aliases: Next_prime

Find the smallest prime larger than this.

)s

Stability: 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

*j

Stability: alpha

Multiply by the imaginary unit. Deeply vectorizes.

*n

Stability: 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.

*p

Stability: beta

Aliases: Power, ˆ

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).

*w

Stability: alpha

Aliases: Product, Þ

(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.

+i

Stability: alpha

Aliases: Plus_ints

Add two things after coercing both to integers.

+j

Stability: alpha

First number plus second number times the imaginary unit.

+l

Stability: unstable

Aliases: Plus_lengths

Add two things after coercing both to ints or floats, sequences by taking their length.

+n

Stability: 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.

+o

Stability: alpha

Aliases: Positive_or_zero

+p

Stability: beta

Aliases: Positive

+w

Stability: beta

Aliases: Sum, Š

(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.

-c

Stability: unstable

Aliases: Clamped_subtract

Subtraction clamped to zero, or saturating subtraction: the maximum of the subtraction or 0.

-i

Stability: unstable

Aliases: Minus_ints

Subtract two things after coercing both to integers.

-j

Stability: alpha

First number minus second number times the imaginary unit.

-l

Stability: unstable

Aliases: Minus_lengths

Subtract two things after coercing both to ints or floats, sequences by taking their length.

-o

Stability: alpha

Aliases: Negative_or_zero

-p

Stability: 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" "" ""]

/j

Stability: 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

:a

Stability: alpha

Aliases: Is_array

Test if array (or range)

:b

Stability: alpha

Aliases: Is_block

Test if block

:c

Stability: alpha

Aliases: Is_char

Test if Char

:f

Stability: alpha

Aliases: Is_float

Test if float

:h

Stability: alpha

Aliases: Is_hoard

Test if hoard

:i

Stability: alpha

Aliases: Is_int

Test if integer

:j

Stability: alpha

Aliases: Is_complex

Test if complex

:n

Stability: alpha

Aliases: Is_number

Test if number (char, int, float, complex)

:o

Stability: 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

:p

Stability: beta

Aliases: Dup_pair, ¦

Duplicate the top two elements of the stack: a b -> a b a b

1 2 3 :p => 1 2 3 2 3

:s

Stability: alpha

Aliases: Is_string

Test if string

;

Stability: stable

Aliases: Pop

Pop the top element of the stack.

1 2 3; => 1 2

;a

Stability: 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

;f

Stability: alpha

Aliases: Pop_if_false

Look at the top element of the stack. Pop it if it's falsy.

;i

Stability: alpha

Aliases: Pop_if

Pop the top element of the stack. Pop the second element if the first element was truthy.

;j

Stability: 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.

;n

Stability: alpha

Aliases: Pop_if_not

Pop the top element of the stack. Pop the second element if the first element was falsy.

;o

Stability: 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

;p

Stability: 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

;s

Stability: beta

Aliases: Pop_stack

;t

Stability: 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.

<a

Stability: alpha

Aliases: Lt_approx

Approximately less than; tolerance is given by Ep, epsilon

<c

Stability: 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.

<e

Stability: beta

Aliases: Leq_or_slice

Less than or equal to.

<el

Stability: unstable

Aliases: Leq_length

Less than or equal to, after coercing two arguments to ints or floats, sequences by taking their length.

<f

Stability: 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.

<h

Stability: 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).

<i

Stability: beta

Aliases: Floor

Golf as:

Round down to the nearest integer.

<l

Stability: unstable

Aliases: Lt_length

Less than, after coercing two arguments to ints or floats, sequences by taking their length.

<m

Stability: beta

Aliases: Min, Õ

Minimum of two values, optionally by a block

<mw

Stability: unstable

Aliases: Min_deep_vectorizing, Õw

Minimum of two values; deeply vectorizes.

<o

Stability: unstable

Aliases: Left_cycle_one

Left cycle a list or string Once: move the first element to the last.

<p

Stability: beta

Aliases: Is_strictly_increasing

Test if strictly increasing

<r

Stability: beta

Aliases: Array_min, Œ

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.

<rs

Stability: alpha

Aliases: Array_minima, Œs

Minima of array, optionally by a block (numbers will coerce to ranges if you supply a block).

<s

Stability: 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.

=a

Stability: alpha

Aliases: Eq_approx

Approximately equal than; tolerance is given by Ep, epsilon

=c

Stability: unstable

Aliases: Index_cyclically

Index into a list cyclically, by taking the index mod the length of the list.

=f

Stability: 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.

=g

Stability: unstable

Aliases: First_duplicate

Find the first element that appears a second time in a sequence.

=h

Stability: 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).

=i

Stability: alpha

Aliases: Round

Round to the nearest integer; follows Python's rules.

=l

Stability: unstable

Aliases: Eq_length

Equal to, after coercing two arguments to ints or floats, sequences by taking their length.

=m

Stability: alpha

Aliases: Median_of_three

Median of three values, optionally by a block

=p

Stability: beta

Aliases: Identical

Golf as: Î

=r

Stability: alpha

Aliases: Array_median

Median of array

=s

Stability: 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.

>a

Stability: alpha

Aliases: Gt_approx

Approximately greater than; tolerance is given by Ep, epsilon

>c

Stability: 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.

>e

Stability: beta

Aliases: Geq_or_slice

Greater than or equal to.

>el

Stability: unstable

Aliases: Geq_length

Greater than or equal to, after coercing two arguments to ints or floats, sequences by taking their length.

>f

Stability: 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.

>h

Stability: 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).

>i

Stability: beta

Aliases: Ceiling

Golf as:

Round up to the nearest integer.

>l

Stability: unstable

Aliases: Gt_length

Greater than, after coercing two arguments to ints or floats, sequences by taking their length.

>m

Stability: beta

Aliases: Max, Ã

Maximum of two values, optionally by a block

>mw

Stability: unstable

Aliases: Max_deep_vectorizing, Ãw

Maximum of two values; deeply vectorizes.

>o

Stability: unstable

Aliases: Right_cycle_one

Right cycle a list or string Once: move the last element to the first.

>p

Stability: beta

Aliases: Is_strictly_decreasing

Test if strictly decreasing

>r

Stability: beta

Aliases: Array_max, Æ

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.

>rs

Stability: alpha

Aliases: Array_maxima, Æs

Maxima of array, optionally by a block (numbers will coerce to ranges if you supply a block).

>s

Stability: 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!"

?j

Stability: 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.

A

Stability: stable

Utility constant: ten

Integer constant with value 10

Aa

Stability: alpha

Alphabet

String constant with value 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'

Above_zero_or_all

Stability: beta

Aliases: Â

Above zero or All

Abs

Stability: stable

Golf as: L

Absolute value of a number.

Abs_diff

Stability: stable

Aliases: Ad, ±

Absolute difference. Mnemonic: + is for "positive" and - is for "difference".

Abs_or_len_or_loop

Stability: alpha

Aliases: L

Abs on numbers; Len on sequences; Loop on blocks.

Ac

Stability: beta

Aliases: Acos

Acos

Stability: beta

Aliases: Ac

Ad

Stability: stable

Aliases: Abs_diff, ±

Absolute difference. Mnemonic: + is for "positive" and - is for "difference".

Ae

Stability: alpha

Aliases: All_and_exists

Ah

Stability: alpha

Hoardify the A variable: delete all variables starting with A and set A to a new empty hoard.

Aj

Stability: unstable

Aliases: Complex_components_array

Real and imaginary part, as a list of two elements on the stack. Mnemonic: A for array as usual.

Al

Stability: beta

Aliases: All

Golf as: Â

All

Stability: beta

Aliases: Al

Golf as: Â

All_and_exists

Stability: alpha

Aliases: Ae

All_slices

Stability: unstable

Aliases: =s, §

All slices of a sequence (numbers coerce to ranges).

An

Stability: beta

Aliases: Any

Golf as: Ê

Antiminus

Stability: beta

Aliases: ¯

Reversed subtraction. Compare Minus_or_reject.

Any

Stability: beta

Aliases: An

Golf as: Ê

Ap

Stability: beta

Aliases: Is_alpha

Tests if characters are letters. Deeply vectorizes.

Array_max

Stability: beta

Aliases: >r, Æ

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_maxima

Stability: alpha

Aliases: >rs, Æs

Maxima of array, optionally by a block (numbers will coerce to ranges if you supply a block).

Array_median

Stability: alpha

Aliases: =r

Median of array

Array_min

Stability: beta

Aliases: <r, Œ

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_minima

Stability: alpha

Aliases: <rs, Œs

Minima of array, optionally by a block (numbers will coerce to ranges if you supply a block).

As

Stability: beta

Aliases: Asin

Asin

Stability: beta

Aliases: As

Assign_bullet

Stability: alpha

Aliases: ·

Assign to the variable •

Assign_bullet_destructive

Stability: alpha

Aliases:

Pop and assign to the variable •

At

Stability: beta

Aliases: Atan

Atan

Stability: beta

Aliases: At

Autozip

Stability: 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.

Av

Stability: alpha

Aliases: Average

Average (deep).

Average

Stability: alpha

Aliases: Av

Average (deep).

Az

Stability: 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.

B

Stability: 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.

Base

Stability: 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_map

Stability: 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.

Bc

Stability: beta

Aliases: Binomial_coefficient

Golf as: Ç

Bh

Stability: alpha

Hoardify the B variable: delete all variables starting with B and set B to a new empty hoard.

Bimask

Stability: 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_if

Stability: beta

Aliases: &

Binary AND on numbers. Intersection on sequences. One-branch if on blocks.

Bin_or_or_union_or_unless

Stability: beta

Aliases: |

Binary OR on numbers. Union on sequences. One-branch unless on blocks.

Bin_string

Stability: beta

Aliases: Bs

Converts numbers to their binary representation as a string. Deeply vectorizes.

Binomial_coefficient

Stability: beta

Aliases: Bc

Golf as: Ç

Boolean_and

Stability: beta

Aliases: &p

Takes two arguments, leaves the first if the first is truthy and the second if the first is falsy.

Boolean_or

Stability: beta

Aliases: |p

Takes two arguments, leaves the first if the first is falsy and the second if the first is truthy.

Break

Stability: beta

Aliases: Quit_loop, Q

Break out of the current loop.

Bs

Stability: beta

Aliases: Bin_string

Converts numbers to their binary representation as a string. Deeply vectorizes.

Butfirst

Stability: beta

Aliases: )s

All but first of sequence

Butlast

Stability: beta

Aliases: (s

All but last of sequence

C

Stability: 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".

Cat

Stability: stable

Golf as: +

Concatenate two lists (numbers coerce to single-element lists).

Cat_between

Stability: unstable

Aliases: Cb

two copies of a with b between: a, b -> a + b + a. Numbers coerce to single-element lists.

Cat_flank

Stability: unstable

Aliases: Cf

a with two copies of b flanking: a, b -> b + a + b. Numbers coerce to single-element lists.

Cb

Stability: unstable

Aliases: Cat_between

two copies of a with b between: a, b -> a + b + a. Numbers coerce to single-element lists.

Cc

Stability: alpha

Aliases: Csc

Ceiling

Stability: beta

Aliases: >i

Golf as:

Round up to the nearest integer.

Ceiling_or_last

Stability: beta

Aliases:

Ceiling or Last of sequence or Modify_last

Center_fill_with_spaces

Stability: 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.

Cf

Stability: unstable

Aliases: Cat_flank

a with two copies of b flanking: a, b -> b + a + b. Numbers coerce to single-element lists.

Ch

Stability: alpha

Hoardify the C variable: delete all variables starting with C and set C to a new empty hoard.

Clamped_subtract

Stability: unstable

Aliases: -c

Subtraction clamped to zero, or saturating subtraction: the maximum of the subtraction or 0.

Co

Stability: alpha

Aliases: Compare, ˜

Compare (-1, 0, or 1)

Compare

Stability: alpha

Aliases: Co, ˜

Compare (-1, 0, or 1)

Compl_or_eval_or_expand

Stability: beta

Aliases: ~

Bitwise complement of integers. Expand lists or strings onto the stack, pushing each element separately in order. Eval on a block.

Complement_parity

Stability: alpha

Aliases: ~p

Complex_components

Stability: 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_array

Stability: unstable

Aliases: Aj

Real and imaginary part, as a list of two elements on the stack. Mnemonic: A for array as usual.

Compose

Stability: alpha

Golf as: +

Compose two blocks together.

Conjugate

Stability: alpha

Aliases: Mj

Negate the imaginary part. Deeply vectorizes.

Continue

Stability: beta

Aliases: Keep_going, K

Skip to the next iteration of the current loop.

Cos

Stability: beta

Aliases: Cs

Cot

Stability: alpha

Aliases: Ct

Count_maybe_factors

Stability: beta

Aliases: #

Count factor multiplicity, frequency, or number satisfying predicate. Mnemonic: number sign, as in you're counting the number of something

Count_pairs

Stability: 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.

Cs

Stability: beta

Aliases: Cos

Csc

Stability: alpha

Aliases: Cc

Ct

Stability: alpha

Aliases: Cot

Cube

Stability: beta

Aliases: ³

Cube a number, or compute the Cartesian product of three copies of a sequence.

D

Stability: beta

Aliases: Reverse_or_doloop, Down_or_doloop

On a number of a sequence, Reverse; on a block, Doloop.

Da

Stability: alpha

Digit alphabet

String constant with value '0123456789'

Dc

Stability: unstable

Aliases: Dictionary

Convert to new dictionary hoard.

Debug

Stability: alpha

A variable tested to see whether debugging output in the program should be enabled.

Integer constant with value 1

Decr

Stability: beta

Golf as: (

Decrease by 1.

Decr_or_uncons_or_modify_first

Stability: beta

Aliases: (

Decr or Uncons or Modify_first.

Decr_two

Stability: beta

Golf as: «

Decrease by 2.

Decr_two_or_but_last

Stability: beta

Aliases: «

Decrease by two, or all but last

Deep_length

Stability: unstable

Aliases: Dl

Deep length.

Dh

Stability: alpha

Hoardify the D variable: delete all variables starting with D and set D to a new empty hoard.

Dictionary

Stability: unstable

Aliases: Dc

Convert to new dictionary hoard.

Digit_sum

Stability: 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_each

Stability: 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_vectorizing

Stability: unstable

Aliases: Ò

Division on numbers; deeply vectorizes.

Divmod_or_zip

Stability: unstable

Aliases: , %p

On integers, integer division and modulus. On two sequences or a block and two sequences, Zip.

Dj

Stability: alpha

Aliases: Range_one_down

Range, inclusive downward from 1

Dl

Stability: unstable

Aliases: Deep_length

Deep length.

Doloop

Stability: beta

Golf as: D

Do loop: execute the block, then pop an element, and repeat until the popped element is falsy.

Double

Stability: beta

Aliases: ×

Down

Stability: beta

Aliases: Reverse

Golf as: D

Reverse a sequence (coerces numbers to range).

Down_or_doloop

Stability: beta

Aliases: Reverse_or_doloop, D

On a number of a sequence, Reverse; on a block, Doloop.

Down_stack

Stability: beta

Aliases: Reverse_stack, Ds

Dp

Stability: alpha

Aliases: Is_digit

Tests if characters are digits. Deeply vectorizes.

Dr

Stability: 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.

Ds

Stability: beta

Aliases: Reverse_stack, Down_stack

Dump

Stability: alpha

Aliases: Pdebug

Print debugging information about the environment and stack.

Dup

Stability: stable

Aliases: :

Duplicate the top element of the stack.

1 2 3 : => 1 2 3 3

Dup_out

Stability: 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_pair

Stability: beta

Aliases: :p, ¦

Duplicate the top two elements of the stack: a b -> a b a b

1 2 3 :p => 1 2 3 2 3

E

Stability: beta

Aliases: Exit

Exit the current program.

Eb

Stability: alpha

Aliases: Epoch_minute

Get the minute from a timestamp

Ec

Stability: beta

Aliases: Exit_with_code

Exit the current program with the specified exit code or message.

Ed

Stability: alpha

Aliases: Epoch_day

Get the day from a timestamp

Ee

Stability: beta

Float constant with value 2.718281828459045

Ef

Stability: beta

Aliases: Exp

Exponential Function

Eh

Stability: alpha

Aliases: Epoch_hour

Get the hour from a timestamp

Ei

Stability: alpha

Aliases: Epoch_twelve_hour

Get the hour, as a number from 1 to 12 from a timestamp

Ej

Stability: alpha

Aliases: Epoch_day_of_year

Get the day of year from a timestamp

Em

Stability: alpha

Aliases: Epoch_month

Get the month from a timestamp

Enumerate

Stability: beta

Golf as: ,

Zip with indices from 0.

Enumerate_one

Stability: beta

Golf as: J

Zip with indices from 1.

Ep

Stability: beta

Epsilon for approximate tests

Float constant with value 1e-09

Epoch_day

Stability: alpha

Aliases: Ed

Get the day from a timestamp

Epoch_day_of_year

Stability: alpha

Aliases: Ej

Get the day of year from a timestamp

Epoch_hour

Stability: alpha

Aliases: Eh

Get the hour from a timestamp

Epoch_iso_weekday

Stability: alpha

Aliases: Eu

Get the ISO weekday (Monday is 1, Sunday is 7) from a timestamp

Epoch_minute

Stability: alpha

Aliases: Eb

Get the minute from a timestamp

Epoch_month

Stability: alpha

Aliases: Em

Get the month from a timestamp

Epoch_second

Stability: alpha

Aliases: Es

Get the second from a timestamp

Epoch_twelve_hour

Stability: alpha

Aliases: Ei

Get the hour, as a number from 1 to 12 from a timestamp

Epoch_weekday

Stability: alpha

Aliases: Ew

Get the weekday (Monday is 0, Sunday is 6) from a timestamp

Epoch_year

Stability: alpha

Aliases: Ey

Get the year from a timestamp

Eq

Stability: beta

Aliases: Equal

Test for value equality.

Eq_approx

Stability: alpha

Aliases: =a

Approximately equal than; tolerance is given by Ep, epsilon

Eq_length

Stability: unstable

Aliases: =l

Equal to, after coercing two arguments to ints or floats, sequences by taking their length.

Equal

Stability: beta

Aliases: Eq

Test for value equality.

Equal_identity

Stability: alpha

Aliases: Is

Test for Python identity (is)

Equal_or_index_or_find

Stability: 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_identical

Stability: beta

Aliases: Î

Identity (equals 1) or Identical

Er

Stability: unstable

Aliases: Range_evens_exclusive

Range, evens, from 0, exclusive

Es

Stability: alpha

Aliases: Epoch_second

Get the second from a timestamp

Et

Stability: alpha

Aliases: Totient

Euler's Totient function. If you don't need vectorizing, Ø works too.

Eu

Stability: alpha

Aliases: Epoch_iso_weekday

Get the ISO weekday (Monday is 1, Sunday is 7) from a timestamp

Ev

Stability: alpha

Aliases: Even

Eval

Stability: alpha

Aliases: Pd

Evaluate a string as Paradoc code

Even

Stability: alpha

Aliases: Ev

Even_or_any

Stability: beta

Aliases: Ê

Even or Any (Exists)

Ew

Stability: alpha

Aliases: Epoch_weekday

Get the weekday (Monday is 0, Sunday is 6) from a timestamp

Exchange_case

Stability: alpha

Aliases: Xc

Swaps the case of all characters. Deeply vectorizes.

Exclusive_or_or_symmetric_difference_or_find_last

Stability: beta

Aliases: ^

Binary XOR on numbers. Symmetric difference on sequences. Find last on block and sequence.

Exclusive_range

Stability: beta

Aliases: Tl

Exclusive_range_or_flatten_once

Stability: beta

Aliases: ¨

Exit

Stability: beta

Aliases: E

Exit the current program.

Exit_with_code

Stability: beta

Aliases: Ec

Exit the current program with the specified exit code or message.

Exp

Stability: beta

Aliases: Ef

Exponential Function

Ey

Stability: alpha

Aliases: Epoch_year

Get the year from a timestamp

F

Stability: beta

Aliases: To_float_or_fixed_point

On a non-block value, To_float; on a block, Fixed_point.

Factorial

Stability: beta

Golf as: ¡

Factorize

Stability: alpha

Aliases: Fc

Factorize as a list of pairs of primes and exponents

Factorize_flat

Stability: alpha

Aliases: Ff

Factorize as a flat list of possibly repeating prime factors

Fb

Stability: beta

Aliases: Fibonacci

Fc

Stability: alpha

Aliases: Factorize

Factorize as a list of pairs of primes and exponents

Ff

Stability: alpha

Aliases: Factorize_flat

Factorize as a flat list of possibly repeating prime factors

Fg

Stability: alpha

Aliases: Float_groups

Finds float-looking parts of a string and converts them to floats.

Fibonacci

Stability: beta

Aliases: Fb

Filter

Stability: stable

Golf as: +

Filter a list by a block (numbers coerce to ranges).

Filter_indexes

Stability: beta

Golf as: ,

List indices at which block is true. Short: ,

Filter_not

Stability: stable

Aliases: Reject

Golf as: -

Filter-not a list by a block (numbers coerce to ranges).

Filter_not_in

Stability: stable

Aliases: Reject_in

Golf as: -

Filter-not-in on lists and strings (numbers coerce to single-element lists).

Find_index

Stability: 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.

First

Stability: stable

Golf as:

First of sequence

First_and_last

Stability: alpha

First and last of sequence

First_duplicate

Stability: unstable

Aliases: =g

Find the first element that appears a second time in a sequence.

Fixed_point

Stability: 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.)

Fl

Stability: beta

Aliases: Flatten

Flatten

Stability: beta

Aliases: Fl

Flatten_once

Stability: beta

Aliases: Fo

Float_groups

Stability: alpha

Aliases: Fg

Finds float-looking parts of a string and converts them to floats.

Floor

Stability: beta

Aliases: <i

Golf as:

Round down to the nearest integer.

Floor_or_first

Stability: beta

Aliases:

Floor or First of sequence or Modify_first

Fo

Stability: beta

Aliases: Flatten_once

Force_stack

Stability: alpha

Aliases: Fs

From_empty_left_slices

Stability: alpha

Aliases: «s

Left slices (including the empty one, by increasing length)

From_empty_right_slices

Stability: alpha

Aliases: »s

Right slices (including the empty one, by increasing length)

Fs

Stability: alpha

Aliases: Force_stack

G

Stability: beta

Aliases: Group_maybe_by

GCD; group like elements of a sequence, possibly under a mapping.

Gcd

Stability: beta

Geq_length

Stability: unstable

Aliases: >el

Greater than or equal to, after coercing two arguments to ints or floats, sequences by taking their length.

Geq_or_slice

Stability: beta

Aliases: >e

Greater than or equal to.

Group

Stability: 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_by

Stability: beta

Golf as: G

Group into runs of equal elements according to the block

Group_maybe_by

Stability: beta

Aliases: G

GCD; group like elements of a sequence, possibly under a mapping.

Gt_approx

Stability: alpha

Aliases: >a

Approximately greater than; tolerance is given by Ep, epsilon

Gt_length

Stability: unstable

Aliases: >l

Greater than, after coercing two arguments to ints or floats, sequences by taking their length.

Gt_or_slice

Stability: 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.

H

Stability: alpha

An empty Hoard

Halve

Stability: alpha

Aliases: ½

Halve_int

Stability: unstable

Aliases: Hi

Has_infix

Stability: 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_prefix

Stability: 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_suffix

Stability: 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_string

Stability: beta

Aliases: Hs

Converts numbers to their hexadecimal representation as a string. Deeply vectorizes.

Hi

Stability: unstable

Aliases: Halve_int

Hoardify_a

Stability: alpha

Aliases: Ah

Hoardify the A variable: delete all variables starting with A and set A to a new empty hoard.

Hoardify_b

Stability: alpha

Aliases: Bh

Hoardify the B variable: delete all variables starting with B and set B to a new empty hoard.

Hoardify_c

Stability: alpha

Aliases: Ch

Hoardify the C variable: delete all variables starting with C and set C to a new empty hoard.

Hoardify_d

Stability: alpha

Aliases: Dh

Hoardify the D variable: delete all variables starting with D and set D to a new empty hoard.

Hs

Stability: beta

Aliases: Hex_string

Converts numbers to their hexadecimal representation as a string. Deeply vectorizes.

Hw

Stability: unstable

String constant with value 'Hello, World!'

Hy

Stability: alpha

Aliases: Hypotenuse

Hypotenuse (square root of sum of squares; deep).

Hypotenuse

Stability: alpha

Aliases: Hy

Hypotenuse (square root of sum of squares; deep).

I

Stability: beta

Aliases: To_int_or_iterate

On a non-block value, To_float; on a block, Iterate.

Ia

Stability: 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.

Identical

Stability: beta

Aliases: =p

Golf as: Î

If

Stability: alpha

Single-branch if.

If_else

Stability: beta

Aliases: ?

If-else.

1 "True!" "False" ? => "True!"

Ig

Stability: alpha

Aliases: Int_groups

Finds integer-looking parts of a string and converts them to integers.

Imaginary_part

Stability: 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_power

Stability: unstable

Aliases: ^j, ˆj

Take the power of the imaginary unit to this number. Deeply vectorizes.

Inclusive_range

Stability: beta

Aliases: To

Inclusive_range_or_flatten

Stability: beta

Aliases:

Incr

Stability: beta

Golf as: )

Increase by 1.

Incr_or_unsnoc_or_modify_last

Stability: beta

Aliases: )

Incr or Unsnoc or Modify_last.

Incr_two

Stability: beta

Golf as: »

Increase by 2.

Incr_two_or_but_first

Stability: beta

Aliases: »

Increase by two, or all but first (tail)

Index_cyclically

Stability: unstable

Aliases: =c

Index into a list cyclically, by taking the index mod the length of the list.

Index_translate

Stability: unstable

Aliases: It

Translate the first argument by indexing into the second.

Int_groups

Stability: alpha

Aliases: Ig

Finds integer-looking parts of a string and converts them to integers.

Int_of_alpha

Stability: 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_sqrt

Stability: alpha

Aliases: Si

Integer square root.

Intdiv_or_split_discard

Stability: 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]]

Inverse

Stability: alpha

Aliases: Í

Inverse (reciprocal) of numbers. Deeply vectorizes.

Is

Stability: alpha

Aliases: Equal_identity

Test for Python identity (is)

Is_alpha

Stability: beta

Aliases: Ap

Tests if characters are letters. Deeply vectorizes.

Is_array

Stability: alpha

Aliases: :a

Test if array (or range)

Is_block

Stability: alpha

Aliases: :b

Test if block

Is_char

Stability: alpha

Aliases: :c

Test if Char

Is_complex

Stability: alpha

Aliases: :j

Test if complex

Is_digit

Stability: alpha

Aliases: Dp

Tests if characters are digits. Deeply vectorizes.

Is_float

Stability: alpha

Aliases: :f

Test if float

Is_hoard

Stability: alpha

Aliases: :h

Test if hoard

Is_int

Stability: alpha

Aliases: :i

Test if integer

Is_lower

Stability: beta

Aliases: Lp

Tests if characters are lowercase. Deeply vectorizes.

Is_number

Stability: alpha

Aliases: :n

Test if number (char, int, float, complex)

Is_prime

Stability: alpha

Aliases: Pp,

Test if this is prime.

Is_sorted

Stability: beta

Aliases: $p

Test if sorted

Is_space

Stability: alpha

Aliases: Wp

Tests if characters are whitespace. Deeply vectorizes.

Is_strictly_decreasing

Stability: beta

Aliases: >p

Test if strictly decreasing

Is_strictly_increasing

Stability: beta

Aliases: <p

Test if strictly increasing

Is_string

Stability: alpha

Aliases: :s

Test if string

Is_upper

Stability: beta

Aliases: Up

Tests if characters are uppercase. Deeply vectorizes.

It

Stability: unstable

Aliases: Index_translate

Translate the first argument by indexing into the second.

Iterate

Stability: 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.

J

Stability: 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_symbol

Stability: unstable

Aliases: Js

Jacobi symbol of two numbers

Js

Stability: unstable

Aliases: Jacobi_symbol

Jacobi symbol of two numbers

K

Stability: beta

Aliases: Continue, Keep_going

Skip to the next iteration of the current loop.

Keep_going

Stability: beta

Aliases: Continue, K

Skip to the next iteration of the current loop.

Key_get

Stability: alpha

Aliases: Kg

Access value corresponding to a key in an array.

Key_map

Stability: alpha

Aliases: Km

Map over keys of an array.

Key_new

Stability: alpha

Aliases: Kn

Make an array given a starting list of key-value pairs, dimensions, and filler.

Kg

Stability: alpha

Aliases: Key_get

Access value corresponding to a key in an array.

King_neighbors

Stability: 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.

Km

Stability: alpha

Aliases: Key_map

Map over keys of an array.

Kn

Stability: alpha

Aliases: Key_new

Make an array given a starting list of key-value pairs, dimensions, and filler.

L

Stability: alpha

Aliases: Abs_or_len_or_loop

Abs on numbers; Len on sequences; Loop on blocks.

La

Stability: alpha

Lowercase alphabet

String constant with value 'abcdefghijklmnopqrstuvwxyz'

Last

Stability: stable

Golf as:

Last of sequence

Lb

Stability: 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.

Lc

Stability: beta

Aliases: Lowercase

Converts all characters to lowercase. Deeply vectorizes.

Lcm

Stability: unstable

LCM of two numbers, or of a list, deeply.

Least_frequent

Stability: alpha

Aliases:

Least frequently appearing element.

Left_add

Stability: 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_spaces

Stability: 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_cycle

Stability: 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_one

Stability: unstable

Aliases: <o

Left cycle a list or string Once: move the first element to the last.

Left_fill

Stability: 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_spaces

Stability: 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_shift

Stability: beta

Golf as: <s

Bitwise left shift

Left_shift_or_slices

Stability: alpha

Aliases: <s

Left_shift on numbers, Left_slices on a sequence

Left_slices

Stability: alpha

Golf as: <s

Left slices (nonempty, by increasing length)

Len

Stability: stable

Golf as: L

Length of a sequence.

Length_stack

Stability: beta

Aliases: Ls

Leq_length

Stability: unstable

Aliases: <el

Less than or equal to, after coercing two arguments to ints or floats, sequences by taking their length.

Leq_or_slice

Stability: beta

Aliases: <e

Less than or equal to.

Lg

Stability: alpha

Aliases: Log_two

Li

Stability: 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_break

Stability: alpha

Aliases: Line_split, Lines, NEWLINEb, \nb

Split by a single newline.

Line_join

Stability: beta

Aliases: NEWLINEr, \nr

Join with newlines

Line_split

Stability: alpha

Aliases: Lines, Line_break, NEWLINEb, \nb

Split by a single newline.

Lines

Stability: alpha

Aliases: Line_split, Line_break, NEWLINEb, \nb

Split by a single newline.

Ln

Stability: beta

Aliases: Log_e

Log_e

Stability: beta

Aliases: Ln

Log_ten

Stability: alpha

Aliases: Lt

Log_two

Stability: alpha

Aliases: Lg

Loop

Stability: alpha

Golf as: L

Loop forever (until Break or other error.)

Loopzip

Stability: 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_base

Stability: 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_int

Stability: 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.

Lowercase

Stability: beta

Aliases: Lc

Converts all characters to lowercase. Deeply vectorizes.

Lp

Stability: beta

Aliases: Is_lower

Tests if characters are lowercase. Deeply vectorizes.

Ls

Stability: beta

Aliases: Length_stack

Lt

Stability: alpha

Aliases: Log_ten

Lt_approx

Stability: alpha

Aliases: <a

Approximately less than; tolerance is given by Ep, epsilon

Lt_length

Stability: unstable

Aliases: <l

Less than, after coercing two arguments to ints or floats, sequences by taking their length.

Lt_or_slice

Stability: 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.

M

Stability: alpha

Aliases: Negate_or_mold_or_memoize

Negate a number, or Mold a sequence like another, or Memoize a block.

Map_on_lines

Stability: alpha

Aliases: NEWLINEm, \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.

Map_on_words

Stability: 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.

Mark

Stability: stable

Aliases: [

Mark the stack.

Mask

Stability: alpha

Golf as:

Mask: Zip two sequences and filter for elements of the first where the corresponding elements of the second are truthy.

Matching_character

Stability: alpha

Aliases: Mc

Finds the matching character for one of the characters ()[]{}<>, or returns the character itself. Deeply vectorizes.

Matching_prefix

Stability: 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.

Max

Stability: beta

Aliases: >m, Ã

Maximum of two values, optionally by a block

Max_deep_vectorizing

Stability: unstable

Aliases: >mw, Ãw

Maximum of two values; deeply vectorizes.

Mc

Stability: alpha

Aliases: Matching_character

Finds the matching character for one of the characters ()[]{}<>, or returns the character itself. Deeply vectorizes.

Median_of_three

Stability: alpha

Aliases: =m

Median of three values, optionally by a block

Memo

Stability: alpha

Aliases: Memoize

Golf as: M

Memoize a block.

Memoize

Stability: alpha

Aliases: Memo

Golf as: M

Memoize a block.

Mf

Stability: alpha

Aliases: Mold_fill

Repeat the first element as many times as needed to mold a sequence like the second.

Min

Stability: beta

Aliases: <m, Õ

Minimum of two values, optionally by a block

Min_deep_vectorizing

Stability: unstable

Aliases: <mw, Õw

Minimum of two values; deeply vectorizes.

Minus

Stability: stable

Golf as: -

Subtract numbers.

Minus_deep_vectorizing

Stability: unstable

Aliases: À

Subraction on numbers; deeply vectorizes.

Minus_ints

Stability: unstable

Aliases: -i

Subtract two things after coercing both to integers.

Minus_lengths

Stability: unstable

Aliases: -l

Subtract two things after coercing both to ints or floats, sequences by taking their length.

Minus_or_reject

Stability: 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_former

Stability: unstable

Aliases: Yf, 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.

Mismatch_index

Stability: 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_latter

Stability: unstable

Aliases: Yl, 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.

Mismatch_pair

Stability: 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_suffixes

Stability: 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.

Mj

Stability: alpha

Aliases: Conjugate

Negate the imaginary part. Deeply vectorizes.

Mod_or_slice_mod_or_split_nonempty_or_map

Stability: 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_first

Stability: beta

Golf as: (

Run a block over the first element of a list, then replace it in the list with the result.

Modify_last

Stability: beta

Golf as: )

Run a block over the last element of a list, then replace it in the list with the result.

Modulus_deep_vectorizing

Stability: unstable

Aliases: Ú

Modulus on numbers; deeply vectorizes.

Mold

Stability: alpha

Golf as: M

Mold the first sequence like the second.

Mold_fill

Stability: alpha

Aliases: Mf

Repeat the first element as many times as needed to mold a sequence like the second.

Most_frequent

Stability: alpha

Aliases:

Most frequently appearing element.

Mul_or_xloop

Stability: 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_vectorizing

Stability: unstable

Aliases: Ó

Multiplication on numbers; deeply vectorizes.

N

Stability: stable

Output record separator

String constant with value '\n'

Na

Stability: beta

Aliases: Not_all

Nb

Stability: alpha

Aliases: Now_minute

Get the current minute

Nc

Stability: alpha

Aliases: Nest_of_character

Finds the amount by which a character affects "nestedness": ([{< give +1, >}]) give -1, everything else gives 0. Deeply vectorizes.

Nd

Stability: alpha

Aliases: Now_day

Get the current day

Ne

Stability: beta

Aliases: Not_any, Not_exists

Golf as: Ô

Negate

Stability: beta

Golf as: M

Negate a number.

Negate_deep

Stability: alpha

Aliases: Ì

Negate numbers. Deeply vectorizes.

Negate_or_mold_or_memoize

Stability: alpha

Aliases: M

Negate a number, or Mold a sequence like another, or Memoize a block.

Negate_real

Stability: unstable

Aliases: |j

Negate the real part. Deeply vectorizes. Mnemonic: reflect this across the vertical y-axis on the complex plane. (Really really unstable.)

Negative

Stability: beta

Aliases: -p

Negative_biased_balanced_mod

Stability: 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_zero

Stability: alpha

Aliases: -o

Nest_of_character

Stability: alpha

Aliases: Nc

Finds the amount by which a character affects "nestedness": ([{< give +1, >}]) give -1, everything else gives 0. Deeply vectorizes.

Newline_output

Stability: beta

Aliases: NEWLINEo, \no

Output a newline.

Newline_print

Stability: beta

Aliases: NEWLINEp, \np

Output a newline, followed by an output record separator.

Newline_repeat

Stability: alpha

Aliases: NEWLINEx, \nx

Next_prime

Stability: alpha

Aliases: )p

Find the smallest prime larger than this.

Nh

Stability: alpha

Aliases: Now_hour

Get the current hour

Ni

Stability: alpha

Aliases: Now_twelve_hour

Get the current hour, as a number from 1 to 12

Nj

Stability: alpha

Aliases: Now_day_of_year

Get the current day of year

Nm

Stability: alpha

Aliases: Now_month

Get the current month

Nop

Stability: stable

Aliases: SPACE, TAB, NEWLINE, RETURN

Do nothing.

Not

Stability: 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_all

Stability: beta

Aliases: Na

Not_any

Stability: beta

Aliases: Not_exists, Ne

Golf as: Ô

Not_exists

Stability: beta

Aliases: Not_any, Ne

Golf as: Ô

Not_imaginary

Stability: unstable

Aliases: !j

Test if the imaginary part is zero. Deeply vectorizes.

Now_day

Stability: alpha

Aliases: Nd

Get the current day

Now_day_of_year

Stability: alpha

Aliases: Nj

Get the current day of year

Now_hour

Stability: alpha

Aliases: Nh

Get the current hour

Now_iso_weekday

Stability: alpha

Aliases: Nu

Get the current ISO weekday (Monday is 1, Sunday is 7)

Now_minute

Stability: alpha

Aliases: Nb

Get the current minute

Now_month

Stability: alpha

Aliases: Nm

Get the current month

Now_second

Stability: alpha

Aliases: Ns

Get the current second

Now_time

Stability: alpha

Aliases: Nt

Now_twelve_hour

Stability: alpha

Aliases: Ni

Get the current hour, as a number from 1 to 12

Now_weekday

Stability: alpha

Aliases: Nw

Get the current weekday (Monday is 0, Sunday is 6)

Now_year

Stability: alpha

Aliases: Ny

Get the current year

Ns

Stability: alpha

Aliases: Now_second

Get the current second

Nt

Stability: alpha

Aliases: Now_time

Nu

Stability: alpha

Aliases: Now_iso_weekday

Get the current ISO weekday (Monday is 1, Sunday is 7)

Nw

Stability: alpha

Aliases: Now_weekday

Get the current weekday (Monday is 0, Sunday is 6)

Ny

Stability: alpha

Aliases: Now_year

Get the current year

O

Stability: beta

Aliases: Output

Output to standard output.

Od

Stability: alpha

Aliases: Odd

Odd

Stability: alpha

Aliases: Od

Odd_or_not_any

Stability: beta

Aliases: Ô

Odd or Not_any

One_time_translate

Stability: 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.

Or

Stability: unstable

Aliases: Range_odds_exclusive

Range, odds, from 1, exclusive

Order_statistic

Stability: alpha

Aliases: ¢

Order statistic (zero-indexed)

Organize

Stability: 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_totient

Stability: alpha

Aliases: Ø

On numbers, Euler's Totient function (does not vectorize). On sequences or blocks with sequences, Organize.

Orthogonal_neighbors

Stability: 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.

Os

Stability: beta

Aliases: Output_stack

Ot

Stability: 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.

Output

Stability: beta

Aliases: O

Output to standard output.

Output_stack

Stability: beta

Aliases: Os

Oz

Stability: 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.

P

Stability: beta

Aliases: Print

Output to standard output, followed by an output record separator.

Pack

Stability: stable

Aliases: ]

Pack the elements above the last stack mark into a list.

Pack_down

Stability: 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_reverse

Stability: stable

Aliases: ¬, Pack_down

Pack the elements above the last stack mark into a list in reverse order.

[1 2 3¬ => [3 2 1]

Palindromize

Stability: alpha

Aliases: Pz

Concatenate a with the tail of its reverse.

Pd

Stability: alpha

Aliases: Eval

Evaluate a string as Paradoc code

Pdebug

Stability: alpha

Aliases: Dump

Print debugging information about the environment and stack.

Peekdo

Stability: beta

Golf as: D

Like Doloop except the condition is peeked instead of popped.

Permutations

Stability: beta

Golf as: ¡

Permutations_or_factorial

Stability: beta

Aliases: ¡, !p

Ph

Stability: alpha

Golden ratio

Float constant with value 1.618033988749895

Phi

Stability: alpha

Float constant with value 1.618033988749895

Pi

Stability: stable

Float constant with value 3.141592653589793

Pl

Stability: 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.

Plus

Stability: stable

Golf as: +

Add numbers.

Plus_deep_vectorizing

Stability: unstable

Aliases: Á

Addition on numbers; deeply vectorizes.

Plus_ints

Stability: alpha

Aliases: +i

Add two things after coercing both to integers.

Plus_lengths

Stability: unstable

Aliases: +l

Add two things after coercing both to ints or floats, sequences by taking their length.

Plus_or_filter

Stability: 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_compose

Stability: 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.

Pop

Stability: stable

Aliases: ;

Pop the top element of the stack.

1 2 3; => 1 2

Pop_around

Stability: 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_if

Stability: alpha

Aliases: ;i

Pop the top element of the stack. Pop the second element if the first element was truthy.

Pop_if_false

Stability: alpha

Aliases: ;f

Look at the top element of the stack. Pop it if it's falsy.

Pop_if_not

Stability: alpha

Aliases: ;n

Pop the top element of the stack. Pop the second element if the first element was falsy.

Pop_if_true

Stability: alpha

Aliases: ;t

Look at the top element of the stack. Pop it if it's truthy.

Pop_out

Stability: 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_pair

Stability: 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_stack

Stability: beta

Aliases: ;s

Pop_under

Stability: beta

Aliases: ¸

Pop the second from the top element of the stack.

1 2 3¸ => 1 3

Positive

Stability: beta

Aliases: +p

Positive_biased_balanced_mod

Stability: 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_zero

Stability: alpha

Aliases: +o

Power

Stability: beta

Aliases: ˆ, *p

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_ten

Stability: alpha

Golf as:

Pp

Stability: alpha

Aliases: Is_prime,

Test if this is prime.

Prev_prime

Stability: alpha

Aliases: (p

Find the largest prime smaller than this.

Print

Stability: beta

Aliases: P

Output to standard output, followed by an output record separator.

Print_lines

Stability: 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_stack

Stability: beta

Aliases: Ps

Printkeep

Stability: unstable

Aliases: Ƥ, ^P

Pop something, output to standard output followed by an output record separator, then push it back. Pretty much just Print__keep.

Product

Stability: alpha

Aliases: Þ, *w

(Deep) product (coerces numbers to range!?).

Product_map

Stability: alpha

Golf as: B

Map over the Cartesian product of two sequences, resulting in a list.

Product_stack

Stability: beta

Aliases: Þs

Ps

Stability: beta

Aliases: Print_stack

Pure_imaginary

Stability: unstable

Aliases: &j, ?j

Test if the real part is zero. Deeply vectorizes.

Py

Stability: alpha

Aliases: Python

Evaluate arbitrary Python code. Push the result if non-None.

Disabled in sandbox mode.

Python

Stability: alpha

Aliases: Py

Evaluate arbitrary Python code. Push the result if non-None.

Disabled in sandbox mode.

Pz

Stability: alpha

Aliases: Palindromize

Concatenate a with the tail of its reverse.

Q

Stability: beta

Aliases: Break, Quit_loop

Break out of the current loop.

Qo

Stability: alpha

Aliases: Quine_output

Output the value of Qn, which will usually be the current program

Qp

Stability: alpha

Aliases: Quine_print

Print the value of Qn, which will usually be the current program

Quarter

Stability: alpha

Aliases: ¼

Quine_output

Stability: alpha

Aliases: Qo

Output the value of Qn, which will usually be the current program

Quine_print

Stability: alpha

Aliases: Qp

Print the value of Qn, which will usually be the current program

Quit_loop

Stability: beta

Aliases: Break, Q

Break out of the current loop.

Qz

Stability: alpha

Aliases: Rectangularize

Rectangularize a matrix: append the filler element as necessary to rows until the matrix is rectangular. Mnemonic: Q for Quadrangle.

R

Stability: beta

Aliases: Reduce

Random_choice

Stability: alpha

Aliases: Rc

Random_float

Stability: alpha

Aliases: Rf

Random_gaussian

Stability: alpha

Aliases: Rg

Random_int

Stability: alpha

Aliases: Ri

Random_seed

Stability: alpha

Range

Stability: beta

Golf as: ,

Range (half-open from 0).

Range_enumerate_one_or_reject_indices

Stability: 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_indices

Stability: 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_exclusive

Stability: unstable

Aliases: Er

Range, evens, from 0, exclusive

Range_len_keep

Stability: 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_exclusive

Stability: unstable

Aliases: Or

Range, odds, from 1, exclusive

Range_one

Stability: beta

Golf as: J

Range, inclusive from 1.

Range_one_down

Stability: alpha

Aliases: Dj

Range, inclusive downward from 1

Rc

Stability: alpha

Aliases: Random_choice

Read_input

Stability: alpha

Aliases: V

Read something from standard input, as determined by the current input trigger.

Rectangularize

Stability: 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_space

Stability: 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.

Reduce

Stability: beta

Aliases: R

Reduce_complex

Stability: 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_array

Stability: 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_match

Stability: 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).

Stability: 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).

Reject

Stability: stable

Aliases: Filter_not

Golf as: -

Filter-not a list by a block (numbers coerce to ranges).

Reject_in

Stability: stable

Aliases: Filter_not_in

Golf as: -

Filter-not-in on lists and strings (numbers coerce to single-element lists).

Replicate

Stability: beta

Aliases: °, Rp

Make a list by repeating an element some number of times.

Repr

Stability: beta

Aliases: `

Push the string Paradoc representation of the top element.

Reverse

Stability: beta

Aliases: Down

Golf as: D

Reverse a sequence (coerces numbers to range).

Reverse_one_or_map

Stability: 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_doloop

Stability: beta

Aliases: Down_or_doloop, D

On a number of a sequence, Reverse; on a block, Doloop.

Reverse_stack

Stability: beta

Aliases: Down_stack, Ds

Rf

Stability: alpha

Aliases: Random_float

Rg

Stability: alpha

Aliases: Random_gaussian

Ri

Stability: alpha

Aliases: Random_int

Right_add

Stability: 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_spaces

Stability: 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_cycle

Stability: 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_one

Stability: unstable

Aliases: >o

Right cycle a list or string Once: move the last element to the first.

Right_fill

Stability: 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_spaces

Stability: 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_shift

Stability: beta

Golf as: >s

Bitwise right shift

Right_shift_or_slices

Stability: alpha

Aliases: >s

Right_shift on numbers, Right_slices on a sequence

Right_slices

Stability: alpha

Golf as: >s

Right slices (nonempty, by increasing length)

Rj

Stability: 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.

Ro

Stability: alpha

Aliases: Rotate

Rotate a matrix, or list of lists, 90 degrees counterclockwise (just by vague mathematical convention of angle).

Rotate

Stability: alpha

Aliases: Ro

Rotate a matrix, or list of lists, 90 degrees counterclockwise (just by vague mathematical convention of angle).

Round

Stability: alpha

Aliases: =i

Round to the nearest integer; follows Python's rules.

Round_or_first_and_last

Stability: alpha

Aliases: ¤

Rp

Stability: beta

Aliases: Replicate, °

Make a list by repeating an element some number of times.

S

Stability: beta

Aliases: To_string

Convert to string

Sc

Stability: alpha

Aliases: Sec

Sec

Stability: alpha

Aliases: Sc

Sg

Stability: alpha

Aliases: Standard_deviation

Standard deviation (deep). Mnemonic: sigma

Sh

Stability: 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_prefix

Stability: 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.

Shell

Stability: 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.

Si

Stability: alpha

Aliases: Int_sqrt

Integer square root.

Signed_replicate

Stability: 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.

Signum

Stability: beta

Golf as: U

Signum of a number (-1, 0, 1) by sign.

Signum_or_uniquify_or_until

Stability: alpha

Aliases: U

Signum or uniquify or until. Mnemonic: U for Unit

Sin

Stability: beta

Aliases: Sn

Sl

Stability: alpha

Aliases: Sleep

Sleep for some number of seconds.

Sleep

Stability: alpha

Aliases: Sl

Sleep for some number of seconds.

Sn

Stability: beta

Aliases: Sin

Sort

Stability: stable

Golf as: $

Sort

Sort_or_stack_select

Stability: beta

Aliases: $

Sort or select from stack

Space_break

Stability: 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_join

Stability: beta

Aliases: SPACEr

Space_output

Stability: beta

Aliases: SPACEo

Output a space.

Space_repeat

Stability: alpha

Aliases: SPACEx

Space_split

Stability: 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.

Square

Stability: beta

Aliases: ²

Square a number, or compute the Cartesian product of a sequence with itself, or map a block across that.

Square_deep

Stability: alpha

Aliases: È

Square of numbers. Deeply vectorizes.

Sr

Stability: 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.

Ss

Stability: beta

Aliases: Subsequences, ¿

Standard_deviation

Stability: alpha

Aliases: Sg

Standard deviation (deep). Mnemonic: sigma

Strcat

Stability: stable

Golf as: +

Concatenate two strings (numbers coerce to strings).

Subsequences

Stability: beta

Aliases: ¿, Ss

Sum

Stability: beta

Aliases: Š, +w

(Deep) sum (coerces numbers to range).

Sum_stack

Stability: beta

Aliases: Šs

Swap

Stability: stable

Aliases: \

Swap the top two elements of the stack.

1 2 3\ => 1 3 2

Swap_around

Stability: 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_in

Stability: 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_out

Stability: 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

T

Stability: 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.

Table

Stability: 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.

Tan

Stability: beta

Aliases: Tn

Tc

Stability: alpha

Aliases: Title_case

Title-cases all strings?

Tf

Stability: 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_quarters

Stability: alpha

Aliases: ¾

Title_case

Stability: alpha

Aliases: Tc

Title-cases all strings?

Tl

Stability: beta

Aliases: Exclusive_range

Tn

Stability: beta

Aliases: Tan

To

Stability: beta

Aliases: Inclusive_range

To_char

Stability: beta

Golf as: C

Convert to char

To_char_or_peekloop

Stability: 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_float

Stability: beta

Golf as: F

Convert to float

To_float_or_fixed_point

Stability: beta

Aliases: F

On a non-block value, To_float; on a block, Fixed_point.

To_int

Stability: beta

Golf as: I

Convert to int

To_int_or_iterate

Stability: beta

Aliases: I

On a non-block value, To_float; on a block, Iterate.

To_string

Stability: beta

Aliases: S

Convert to string

Totient

Stability: alpha

Aliases: Et

Euler's Totient function. If you don't need vectorizing, Ø works too.

Translate

Stability: 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.

Transpose

Stability: beta

Aliases: Tt,

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_fill

Stability: 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_space

Stability: alpha

Aliases: SPACEt

Transpose a matrix, or list of lists (or of strings), adding the space character as necessary until the matrix is rectangular.

Tt

Stability: beta

Aliases: Transpose,

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_vectorizing

Stability: alpha

Aliases: É

Two to the power of numbers. Deeply vectorizes.

U

Stability: alpha

Aliases: Signum_or_uniquify_or_until

Signum or uniquify or until. Mnemonic: U for Unit

Ua

Stability: alpha

Uppercase alphabet

String constant with value 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

Ub

Stability: 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.

Uc

Stability: beta

Aliases: Uppercase

Converts all characters to uppercase. Deeply vectorizes.

Ui

Stability: 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.

Ul

Stability: alpha

Aliases: Unless

Single-branch unless.

Uncons

Stability: beta

Golf as: (

Split into tail and first.

[1 2 3]Uncons => [2 3]1

Under_zero_or_is_unique

Stability: beta

Aliases: Û

Under zero or Unique (test)

Unique

Stability: beta

Golf as: Û

Uniquify

Stability: alpha

Golf as: U

Uniquify a sequence: drop all but first occurrence of each element

Unless

Stability: alpha

Aliases: Ul

Single-branch unless.

Unrotate

Stability: alpha

Aliases: Ur

Rotate a matrix, or list of lists, 90 degrees clockwise (just by vague mathematical convention of angle).

Unsnoc

Stability: beta

Golf as: )

Split into init and last.

[1 2 3]Uncons => [1 2]3

Until

Stability: alpha

Golf as: U

Until loop: Execute first block, pop, stop if true, execute second block, repeat.

Up

Stability: beta

Aliases: Is_upper

Tests if characters are uppercase. Deeply vectorizes.

Upper_base

Stability: 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_int

Stability: 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.

Uppercase

Stability: beta

Aliases: Uc

Converts all characters to uppercase. Deeply vectorizes.

Ur

Stability: alpha

Aliases: Unrotate

Rotate a matrix, or list of lists, 90 degrees clockwise (just by vague mathematical convention of angle).

V

Stability: alpha

Aliases: Read_input

Read something from standard input, as determined by the current input trigger.

Value_of_character

Stability: 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.

Vc

Stability: 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.

W

Stability: alpha

Aliases: Window_or_words_or_while

Words (split by spaces) or Window (sliding window of size given by number) or While loop.

While

Stability: alpha

Golf as: W

While loop: Execute first block, pop, break if false, execute second block, repeat.

Window

Stability: alpha

Golf as: W

Window_or_words_or_while

Stability: alpha

Aliases: W

Words (split by spaces) or Window (sliding window of size given by number) or While loop.

Words

Stability: alpha

Golf as: W

Wp

Stability: alpha

Aliases: Is_space

Tests if characters are whitespace. Deeply vectorizes.

Xa

Stability: 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.

Xc

Stability: alpha

Aliases: Exchange_case

Swaps the case of all characters. Deeply vectorizes.

Xm

Stability: 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).

Xs

Stability: 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).

Ya

Stability: 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.

Yb

Stability: 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.

Yd

Stability: 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.

Yf

Stability: 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.

Yi

Stability: 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.

Yl

Stability: 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.

Ym

Stability: 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.

Yp

Stability: 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.

Ys

Stability: 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_fill

Stability: 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.

Zf

Stability: 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.

Zip

Stability: 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.

Ziplongest

Stability: 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.

Zl

Stability: 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.

Zp

Stability: 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.

Zt

Stability: 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.

[f

Stability: 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

\a

Stability: 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

\i

Stability: 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

\j

Stability: alpha

Swap the real and imaginary part. Deeply vectorizes.

\nb

Stability: alpha

Aliases: Line_split, Lines, Line_break, NEWLINEb

Split by a single newline.

\nm

Stability: 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.

\no

Stability: beta

Aliases: Newline_output, NEWLINEo

Output a newline.

\np

Stability: beta

Aliases: Newline_print, NEWLINEp

Output a newline, followed by an output record separator.

\nr

Stability: beta

Aliases: Line_join, NEWLINEr

Join with newlines

\nx

Stability: alpha

Aliases: Newline_repeat, NEWLINEx

\o

Stability: 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.

]_case

Stability: 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.

]_check

Stability: 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.

]_stream

Stability: 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.

]c

Stability: 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.

]f

Stability: 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.

]s

Stability: 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.

^j

Stability: 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.

|j

Stability: 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.)

|p

Stability: 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.

~j

Stability: 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 ~.

~p

Stability: alpha

Aliases: Complement_parity

NBSP

Stability: 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

Aliases: Dup_pair, :p

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

«p

Stability: 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.

«s

Stability: 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

Aliases: Replicate, Rp

Make a list by repeating an element some number of times.

±

Stability: stable

Aliases: Abs_diff, Ad

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

Aliases: Is_prime, Pp

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)

»p

Stability: 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.

»s

Stability: 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

Aliases: Max, >m

Maximum of two values, optionally by a block

Ãw

Stability: unstable

Aliases: Max_deep_vectorizing, >mw

Maximum of two values; deeply vectorizes.

Å

Stability: alpha

Uppercase alphabet alias

String constant with value 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

Åa

Stability: alpha

String constant with value 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'

Åb

Stability: alpha

String constant with value 'BCDFGHJKLMNPQRSTVWXZbcdfghjklmnpqrstvwxz'

Åc

Stability: alpha

String constant with value 'BCDFGHJKLMNPQRSTVWXYZbcdfghjklmnpqrstvwxyz'

Åd

Stability: alpha

String constant with value '9876543210'

Åf

Stability: alpha

String constant with value 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'

Åh

Stability: alpha

String constant with value '0123456789ABCDEF'

Åi

Stability: alpha

String constant with value 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_'

Åj

Stability: alpha

String constant with value 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'

Ål

Stability: alpha

String constant with value 'zyxwvutsrqponmlkjihgfedcba'

Åm

Stability: alpha

String constant with value '()<>[]{}'

Åp

Stability: alpha

String constant with value ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~'

Åq

Stability: alpha

String constant with value 'QWERTYUIOPqwertyuiop'

Ås

Stability: alpha

String constant with value 'ASDFGHJKLasdfghjkl'

Åt

Stability: alpha

String constant with value '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'

Åu

Stability: alpha

String constant with value 'ZYXWVUTSRQPONMLKJIHGFEDCBA'

Åv

Stability: alpha

String constant with value 'AEIOUaeiou'

Åx

Stability: alpha

String constant with value 'ZXCVBNMzxcvbnm'

Åy

Stability: alpha

String constant with value 'AEIOUYaeiouy'

Åz

Stability: alpha

String constant with value 'zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA'

Æ

Stability: beta

Aliases: Array_max, >r

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.

Æs

Stability: 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

Aliases: Min, <m

Minimum of two values, optionally by a block

Õw

Stability: 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

Aliases: Product, *w

(Deep) product (coerces numbers to range!?).

Þs

Stability: 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

Aliases: Array_min, <r

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.

Œs

Stability: alpha

Aliases: Array_minima, <rs

Minima of array, optionally by a block (numbers will coerce to ranges if you supply a block).

Š

Stability: beta

Aliases: Sum, +w

(Deep) sum (coerces numbers to range).

Šs

Stability: beta

Aliases: Sum_stack

Ƥ

Stability: unstable

Aliases: Printkeep, ^P

Pop something, output to standard output followed by an output record separator, then push it back. Pretty much just Print__keep.

ˆ

Stability: beta

Aliases: Power, *p

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).

ˆj

Stability: unstable

Aliases: Imaginary_unit_power, ^j

Take the power of the imaginary unit to this number. Deeply vectorizes.

˜

Stability: alpha

Aliases: Compare, Co

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

‹p

Stability: 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

›p

Stability: 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

Aliases: Transpose, Tt

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