forked from isaacg1/pyth
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rev-doc.txt
401 lines (397 loc) · 29.5 KB
/
rev-doc.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
Pyth reference and documentation
This file is intended to be read with line wrapping.
Tokens are given in the order: 1 character tokens, by code point, . tokens, by code point.
Types:
num = int, float
cmp = complex
seq = str, list, tuple
lst = list, tuple
idx = str, list, dict
col = str, list, set, dict
any = any expression (a for short)
blk = a code block (any series of statements)
... = any number of arguments of any type.
n:_ = n _ arguments.
var = variable. Not evaluated.
func = function. Not evaluated.
func n = function with arity n.
pfn = Preceding function of arity n. *F, for instance.
l:_ = Lambda with lambda variable(s) _
pos = positive int.
nneg = nonnegative int.
neg = negative int.
none = missing argument.
c/n or col/num = col or num, where num is cast to list using U.
s/n or seq/num = seq or num, where num is cast to list using U.
<type1(type2)> = Type1 whose elements are of the for Type2.
Shorthands:
In the text, A refers to the first argument, B to the second, etc.
If two type definitions overlap, more specific takes precedence.
No operations modify the input unless specifically specified.
x -> y -> z -> ... means on future / nested uses, the successive character is used. If there is an extra -> at the end, it is cyclic.
Format:
Char, Input types | Effect
Tokens:
0 Leading 0 is a separate token, number zero.
0123456789. Numeric literals. Leading 0 ignored, trailing . often parses separately
\n <any> Print with trailing newline. Return input.
<any> Identity function. Suppresses printing.
! <any> Logical negation. 0, 0.0, "", [], (), {}, set() -> True, else False.
" Begin and end string literal.
# <blk> Loop until error statement. On error, suppress and break out of loop.
# <pfn> <n-1:any> <col> Filter A(_, B ...) over C. Uses f underneath, B may refer to f's lambda var. # looks like a strainer.
$ Begin and end Python literal. Counts as one token. Disabled in -s (online).
% <num> <num> Modulo. Same as Python.
% <int> <seq> Every Ath element of B. B[::A] in Python.
% <str> <lst> Format string, B is list of arguments. % in Python.
% <str> <any> Format string, B is only argument.
% <cmp> <num> Apply modulo to real and imaginary parts separately.
& <any> <any> If not A, return A. Else, return B. Short-circuiting. Same as Python and.
' <str> Open the file or website given by the input string. Return list of lines if normal file or website. Return list of color triples for color images, and list of brightness values for grayscale images.
( <...> Tuple constructor. tuple(A) in Python.
) End function or statement.
* <num> <num> Multiplication. * in Python.
* <num> <seq> Repetition. * in Python.
* <seq> <num> Repetition. * in Python.
* <col> <col> Cartesian product. All pairs of A_elem, B_elem.
+ <num> <num> Addition. + in Python.
+ <str> <str> Concatenate. + in Python.
+ <lst> <lst> Concatenate. + in Python (But cast to list).
+ <lst> <any> Append B to the end of A.
+ <any> <lst> Prepend A to the beginning of B.
+ <str> <num> Append str(B) to the end of A.
+ <num> <str> Prepend str(A) to the beginning of B.
+ <set> <col> Union of A and B.
+ <set> <any> Union of A and {B}.
, <any> <any> [A, B]
- <num> <num> Subtraction. - in Python.
- <col> <col> Filter A on absence from b. Uses not in.
- <num> <col> Cast A to B's type, then filter on absence.
- <col> <num> Cast B to A's type, then filter on absence.
/ <num> <num> Integer division. // in Python.
/ <lst> <any> Count occurrences of B in A.
/ <str> <str> Count occurrences of B in A.
: <seq> <int> <int> Slice of A from B to C. A[B:C] in Python.
: <num> <num> <num> Stepped range. Go from A to B with a step size of C.
: <idx> <col> <col> Multiple assignment. For i in B, A[i] = C[i], If C runs out, it repeats.
: <idx> <col> <num> Multiple assignment. For i in B, A[i] = C.
: <str> <str> <str> Regex substitution. In A, replace B with C.
: <str> <str> 0|<none> Regex search boolean. In A, return whether a match for B is found.
: <str> <str> 1 Regex search. In A, return every match for B (non overlapping)
: <str> <str> 2 In A, replace each match of regex B with its first capturing group.
: <str> <str> 3 Split A on matches of regex B. Retain capturing groups.
: <str> <str> 4 Return list of match and all capturing groups for each match of B in A.
; End all containing functions, statements, etc., if not inside a lambda function.
; Global value of innermost lambda's first variable.
< <num> <num> Less than, numeric.
< <str> <str> Less than, lexicographic.
< <lst> <lst> Less than, lexicographic.
< <seq> <num> First B elements of A. A[:B] in Python.
< <num> <seq> All but last A elements of B. B[:len(B)-A] in Python.
< <cmp> <num> Less than, absolute value/magnitude.
< <num> <cmp> Less than, absolute value/magnitude.
< <set> <col> Proper subset.
= <var> <any> Assign A value B. deepcopy value before assignment. Return assigned value.
= <func> <...> Assign x value A(B,..), where x is the first variable after the =, or Q if there is none. The Python Y += 3 would be =+Y3. Return assigned value.
> <num> <num> Greater than, numeric.
> <str> <str> Greater than, lexicographic.
> <lst> <lst> Greater than, lexicographic.
> <seq> <num> A at and after index B. A[B:] in Python.
> <num> <seq> Last A elements of B. B[len(B)-A:] in Python.
> <cmp> <num> Greater than, absolute value/magnitude.
> <num> <cmp> Greater than, absolute value/magnitude.
> <set> <col> Proper superset.
? <any> <any> <any> Ternary. A ? B : C in C-like languages. B if A else C in Python.
@ <seq> <num> Index into the sequence. Modular wrapping. A[B % len(A)] in Python.
@ <dict> <any> Index into the dict. A[B] in Python.
@ <col> <col> Intersection. Filter B on presence in A.
@ <num> <num> Root. A ** (1/B) in Python.
A <list,2-elements> Assign the first value of the list to G and the second to H. Return the input.
B Break. Ends surrounding statement.
B <pfn> <any> <n-1:any> Bifurcate. Return two element list [B, A(B, ...)].
C <int> Character with code point A. If A is too large, convert to base 256 and turn each into a character.
C <float> C(floor(A))
C <cmp> Complex conjugate.
C <str> Convert A to int using base 256 and code points.
C <col> Matrix transpose, truncating to the length of the shortest entry.
D <func n> <n:var> <blk> Define a function. Same as def A(B...) in Python.
D <pfn> <n-1:any> <col> Sort operator. Sort C with key A(_, B ...). Uses o underneath, B may refer to o's lambda var.
E Evaluate input. Same as ast.literal_eval(input()) in Python.
F <pf1> <any> <int> Apply repeatedly. A(A(A(A(... B ... )))), C times.
F <pf2> <seq> Fold A over B, with first element as initial value. Same as .U <A> bZ <B>. On empty sequence, value is 0, unless A is *, in which case it is 1.
F <pf3+> <seq> Apply A to B, with splatting. A(*B) in Python.
F <var> <num> <blk> For A in range(int(B)): C
F <var> <any> <blk> For A in B: C
G Variable. Initialized to "abcdefghijklmnopqrstuvwxyz", alphabet.
H Variable. Initialized to {}. (Hash table)
I <any> <blk> if A: B
I <pfn> <any> <n-1:any> Invariant. A(B, ...) == B.
J <any> Variable, Autoinitializing. J=A on first use and all uses before an assignment expression finishes.
J Variable. After the assignment expression.
K <any> Variable, Autoinitializing. K=A on first use and all uses before an assignment expression finishes.
K Variable. After the assignment expression.
L <any> def y(b): return A. y -> ' ->
L <pfn> <n-1:any> <col> Left map. n>=2. Map A(B, ..., _) over C, where _ is the lambda variable. Map uses m underneath, and B may refer to its lambda variable.
M <any> def g(G,H): return A. g -> n ->
M <pf1> <col> Map. Map A(_) over B, where _ is the lambda variable. Map uses m underneath.
M <pfn> <col(seq)> Map. Map A(*_) over B, where _ is the lambda variable. Map uses m underneath. Each element of B is splatted as the arguments to A.
N Variable. Initialized to '"', quote mark.
O <int> If A > 0, random int below A. If A == 0, random float 0 to 1. If A < 0, random.seed(-A).
O <float> Random float 0 to A.
O <cmp> A multiplied by random float 0 to 1.
O <col> Random element of A.
P <nneg> List of prime factors of A with multiplicity in increasing order. Uses sympy if sympy is installed, trial division otherwise. Empty list if A is 0 or 1.
P <neg> Returns whether -A is prime.
P <num> Complex phase of A.
P <seq> All but the last element of A. A[:-1] in Python.
Q Variable, Autoinitialized to eval(input()).
R <any> Return, used inside D.
R <pfn> <n-1:any> <col> Right map. n >= 2. Map A(_, B, ...) over C, where _ is the lambda variable. Map uses m underneath, and B may refer to its lambda variable.
S <col> Sort. sorted(A) in Python.
S <int> 1-indexed range. [1, 2, ... A].
S <num> 1-indexed range up to floor of A.
T Variable. Initialized to 10. (Ten)
U <nneg> Unary range. [0, 1, ... A-1]. range(A) in Python.
U <neg> Reversed unary range. [A, A+1, ... -1]. range(A, 0) in Python.
U <col> Unary range of length. [0, 1, ... len(A)-1]. range(len(A)) in Python.
V <num> <blk> Shorthand for 'FNU'. N -> H -> b ->
V <col> <blk> Shorthand for 'FN'. N -> H -> b ->
V <pfn> <col> <col> Vectorized function. Equivalent to MC,
W <any> <blk> While loop. while A: B in Python.
W <pfn> <a> <a> <n-1:a> Conditional application. If B, A(C, ...). Else, C.
X <dict> <list> <any> Dictionary assignment. A[tuple(B)] = C in Python.
X <dict> <any> <any> Dictionary assignment. A[B] = C
X <str> <int> <any> String assignment. Replace in A at index B with str(C). Modular indexing.
X <seq> <int> <any> Sequence assignment. Replace in A at index B with C. Modular indexing.
X <seq> <seq> <seq> Translate A from B to C. Modular indexing.
X <seq> <seq> <none> Translate A from B to B[::-1].
X <int> <list> <any> In-place +=. B[A] += C. Modular indexing. Uses Pyth +.
X <list> <dict> <any> B[tuple(A)] += C, or B[tuple(A)] = C if tuple(A) not in B. Uses Pyth +.
X <any> <dict> <any> B[A] += C, or B[A] = C if A not in B. Uses Pyth +.
X <int> <str> <any> Insert into string. Insert str(C) into B at A.
Y Variable. Initialized to [], empty list.
Z Variable. Initialized to 0. (zero)
[ <...> List constructor, unbounded number of arguments. [A1, A2, A3, A4 ... ], where A1, A2, .. are the arguments. Often used with ")".
\ <char> One character string.
] <any> [A].
^ <num> <num> Exponentiation. A ** B in Python.
^ <col> <int> Repeated Cartesian Product. itertools.product(A, repeat=B) in Python.
_ <num> Negation. -A in Python.
_ <seq> Reversal. A[::-1] in Python.
_ <dict> Swap keys and values.
` <any> Representation. repr in Python.
a <list> <any> Append. A.append(B) in Python. Return A.
a <set> <any> Add. A.add(B) in Python. Return A.
a <num> <num> Absolute difference. abs(A - B) in Python.
b Variable. Initialized to '\n', newline.
c <num> <num> Float division. A / B in Python.
c <str> <str> Split. A.split(B) in Python.
c <str> <none> Split on whitespace. A.split() in Python.
c <str> <int> Chop A into pieces of length B. Last shorter if necessary.
c <int> <str> Chop A into B pieces of equal sizes, initial pieces one longer if necessary.
c <seq> <col of ints> Chop A at every location in B.
c <seq> <any> Chop A at every occurrence of B.
d Variable. Initialized to ' ', space.
e <seq> End. A[-1] in Python.
e <cmp> Imaginary part. A.imag in Python.
e <num> Last digit. A % 10 in Python.
f <l:T> <col> Filter A(_) over B. T -> Y -> Z ->
f <l:T> <num> First input where A(_) is truthy over [B, B+1, B+2, ...]
f <l:T> <none> First input where A(_) is truthy over [1, 2, 3, 4...]
g <num> <num> Greater than or equal. A >= B in Python.
g <seq> <seq> Greater than or equal. A >= B in Python.
g <set> <col> Superset. A.issuperset(B)
g <seq> <num> Inclusive slice. A[B-1:] in Python.
h <seq> Head. A[0] in Python.
h <num> A + 1.
i <str> <int> Convert A from base B to int. if A is '', return 0. int(A, B) in Python.
i <seq> <num> Convert A from base B to int.
i <int> <int> GCD.
j <int> <int> Convert A to base B as a list.
j <str> <col> Join B on A. Convert elements of B to strings if needed.
j <col> <none> Join A on newlines.
j <any> <col> Join B on A. Convert A to a string, elements of B to strings.
k Variable. Initialized to '', empty string.
l <col> len(A).
l <num> log base 2 of A.
m <l:d> <col/num> Map A(_) over B. d -> k -> b ->
n <any> <any> A != B
o <l:N> <col/num> Sort B with key function A. sorted(B, key=A) in Python. N -> Y ->
p <any> Print A, with no trailing newline. Return A.
q <any> <any> A == B
r <str> 0 A.lower()
r <str> 1 A.upper()
r <str> 2 A.swapcase()
r <str> 3 A.title()
r <str> 4 A.capitalize()
r <str> 5 string.capwords(A)
r <str> 6 A.strip() - Remove whitespace on both sides of A.
r <str> 7 Split A, eval each part.
r <seq> 8 Run length encode A. Output format [[3, 'a'], [2, 'b'], [1, 'c'], [1, 'd']].
r <str> 9 Run length decode A. Input format '3a2bcd' -> 'aaabbcd'
r <seq> 9 Run length decode A. Input format [[3, 'a'], [2, 'b'], [1, 'c'], [1, 'd']].
r <int> <int> Range, half inclusive. range(A, B) in Python, or range(A, B, -1).
r <str> <str> String range. r(C(A), C(B)), then convert each int to string using C.
r <int> <seq> r(B, A)
s <col(str)> Concatenate. ''.join(A)
s <col> reduce on +, base case []. (Pyth +)
s <cmp> Real part. A.real in Python.
s <num> Floor to int. int(A) in Python.
s <str> Parse as int. "" parses to 0. int(A) in Python.
t <num> A - 1.
t <seq> Tail. A[1:] in Python.
u <l:GH> <seq/num> <any> Reduce B from left to right, with function A(_, _) and C as starting value. G, H -> N, T ->. A takes current value, next element of B as inputs. Note that A can ignore either input.
u <l:GH> <any> <none> Apply A(_, _) until a result that has occurred before is found. Starting value B. A takes current value, iteration number as inputs.
v <str> Eval. eval(A) without -s, ast.literal_eval(A) with -s (online). literal_eval only allows numeric, string, list, etc. literals, no variables or functions.
w Take input. Reads up to newline. input() in Python 3.
x <int> <int> Bitwise XOR. A ^ B in Python.
x <lst> <any> First occurrence. Return the index of the first element of A equal to B, or -1 if none exists.
x <str> <str> First occurrence. Return the index of the first substring of A equal to B, or -1 if none exists.
x <non-lst> <lst> All occurrences. Returns a list of the indexes of elements of B that equal A.
x <str> <non-lst> First occurence. Return the index of the first substring of A equal to str(B), or -1 if none exists.
y <seq> Powerset. All subsets of A, ordered by length.
y <num> A * 2.
z Variable. Autoinitialized to input().
{ <col> Deduplicate. Remove all duplicated elements in A, leaving the first occurrences in original order.
| <any> <any> Logical or. If A, return A. Else, return B. Short circuiting. or in Python.
} <any> <lst> In. Returns a boolean for whether A is an element of B. in in Python.
} <str> <str> In. Returns a boolean for whether A is a substring of B. in in Python.
} <int> <int> Inclusive range. [A, A+1, ... B]
~ <var> <any> Assign A value B. Return original value of A.
~ <func> <var> <...> Assign x value A(B,..), where x is the first variable after the =. The Python Y += 3 would be =+Y3. Return original value of B.
.! <int> Factorial. *F works the same and should be prefered.
.! <num> Gamma function of A + 1. This is continuous with the factorial function. *F works the same and should be prefered.
." ." starts a packed string, terminated by " or end of file. Format is: first character is the lowest output character by code point, second is the highest. The rest of the string is the output string encoded as offsets from the lowest output character, treat as an integer in the minimal base, converted to base 256, as bytes in the rest of the string. To convert a desired output string to the format, use the following program: +++\.N++hSzeSzCi-RChSzCMz-hCeSzChSzN Null bytes, backslashes and double quotes will need to be escaped.
.& <int> <int> Bitwise and. & in Python.
.( <lst> <int> Pop at location. A is mutated to remove the element at index B, which is returned.
.) <lst> Pop last element. A is mutated to remove its final element, which is returned.
.* <seq> Splat. A is treated as all of the arguments to the surrounding function.
.+ <seq> Deltas. Difference between each consecutive pair of elements of A.
.- <col> <col> Bagwise subtraction. For each element in B, remove its first occurrence in A from A and return. Non-mutating.
./ <seq> Partition. Return all divisions of A into disjoint substrings.
./ <nneg> Integer partition. Return all sorted lists of positive integers that add to A.
.: <seq/num> <int> All substrings of A of length B.
.: <seq/num> <float> All substrings of A of length floor(len(A) * B)
.: <seq/num> <none> All substrings of A of positive length.
.< <seq> <int> Cyclically rotate A left by B elements. A[B:] + A[:B] in Python.
.< <int> <int> Left shift. A shifted left by B, or A * 2 ^ B. A << B in Python.
.> <seq> <int> Cyclically rotate A right by B elements. A[-B:] + A[:-B] in Python.
.> <int> <int> Right shift. A shifted right by B, or A / (2 ^ B). A >> B in Python.
.? <blk> Else statement. Must come after I, F, V, W or #. else: in Python.
.A <col> Tests whether all elements of A are truthy. all in Python.
.B <int> Converts A to a binary string.
.B <str> Converts A to a binary string, treating the string as a base 256 integer.
.C <col> <int> Combinations with replacement. All sorted lists of elements of A, of length B.
.D <num> <num> Divmod. Returns [A / B, A % B].
.D <seq> <col> Returns A with elements at indexes in B removed.
.D <seq> <num> Returns A with the element at index B removed.
.E <col> Tests whether any elements of A are truthy. any in Python.
.E <num> Rounds up. int(math.ceil(A)) in Python.
.F <str> <seq> String format. A.format(*B) in Python.
.F <str> <str> String format. A.format(B) in Python.
.H <int> Converts A to a hexadecimal string.
.H <str> Converts A to a hexadecimal string, treating the string as a base 256 integer.
.I <l:G> <num> Invert. A is a monotonic function from num to num. .I finds x such that A(x) = B.
.M <l:Z> <seq> Filter B for elements x for which A(x) takes its maximal value.
.N <any> def :(N, T, Y): return _. The function is called ':'. : -> X ->
.O <int> Converts A to an octal string.
.O <str> Converts A to an octal string, treating the string as a base 256 integer.
.O <col(num)> Average of A. If A is empty, 0.0
.P <col> <int> Permutations. All lists of elements of A of length B.
.P <int> <col> Ath lexicographical permutation of B. Zero-indexed with modular indexing.
.P <int> <int> nPr. Number of permutations of length B from A elements.
.Q Evaluate all input. Take all input from STDIN, literal_eval each line, return list of the result.
.R <num> <int> Round A to B decimal places. Convert to int if B == 0.
.R <num> <num> Round A to the same number of decimal places as B is rounded to.
.S <col/num> Randomly shuffle A. If A is a list, mutate A to the result.
.T <col> Justified transpose. List of 0th elements of A's elements, list of 1st elements, ... Ignoring absences.
.U <l:bZ> <seq> Reduce with no starting value. Reduce from left to right, with initial value B[0]. A(_, _) takes inputs current value, next element of B. b, Z -> k, Y ->.
.V <num> Infinite for loop. b iterates over an infinite incrementing sequence starting at the input number.
.V <str> Infinite for loop. b iterates over an infinite lexicographically sequence of upper and lowercase strings starting at the input string.
.W <l:H> <l:Z> <any> Functional while. While A(value) is truthy, value = B(value). value starts as C. return ending value.
.Z <str> Attempt to decompress A using zlip.decompress. If that fails, compress it with zlib.compress(A, 9).
.[ <str> <str> <int> Pad A on the right with a prefix of repeated copies of B to a length of the nearest multiple of C.
.[ <str> <int> <str> Pad C on the left with a prefix of repeated copies of A to a length of the nearest multiple of B.
.[ <int> <str> <str> Pad B on evenly on both sides with a prefix of repeated copies of C to a length of the nearest multiple of A. Ties broken to the right.
.[ <seq> <any> <int> Pad list(A) on the right with copies of B as elements to a length of the nearest multiple of C.
.[ <any> <int> <seq> Pad list(C) on the left with copies of A as elements to a length of the nearest multiple of B.
.[ <int> <seq> <any> Pad list(B) on both sides with copies of C as elements to a length of the nearest multiple of A. Ties broken to the right.
.^ <int> <int> <int> Modular exponentiation. A ^ B % C, but faster. pow in Python.
._ <seq> All prefixes of A, length 1 to len(A).
._ <num> Sign of A. 1 if A > 0, -1 if A < 0, 0 otherwise.
.a <num> Absolute value. abs in Python.
.a <lst of num> L2 norm of A, treated as a vector.
.a <lst of 2 lst of num> L2 norm of vector difference of A[0] and A[1].
.b <l:NY> <c/n> <c/n> Map A over B and C in parallel.
.b <l:NY> <seq> <none> Same as above, but splat each element of B into N and Y instead.
.c <int> <int> nCr. Number of distinct B-element combinations of A distinct items.
.c <col> <int> All B-element combinations of A, not necessarily distinct.
.d 0 Current system time, in seconds since epoch. time.time() in Python.
.d 1 Amount of time the current program has been running. time.process_time() in Python.
.d 2 The current [year, month, day, hour, minute, second, microsecond]
.d 3 The current year.
.d 4 The current month.
.d 5 The current day.
.d 6 The current hour.
.d 7 The current minute.
.d 8 The current second.
.d 9 The current weekday, zero indexed at Monday.
.d <num> Sleep for A seconds.
.d <col(2-element-lst)> Dictionary constructor. dict in Python.
.e <l:bk> <col> Enumerated map. Map A over elements of B (as b) and their indexes (as k). b, k -> Z, Y ->.
.f <l:Z> <int> <num> First B inputs to A with truthy results, starting at C and counting up by 1.
.f <l:Z> <int> <str> First B inputs to A with truthy results, starting at C and proceeding lexicographically throw upper and lowercase strings.
.f <l:Z> <int> <none> First B inputs to A with truthy results, of 1, 2, 3, ...
.g <l:k> <col/num> Group the elements of B by matching outputs of A, sorted by values of A.
.i <col> <col> Interleave the elements of A and B. Non-truncating.
.j <num> <num> A + B * j. j is imaginary unit.
.j <num> <none> A + j. j is imaginary unit.
.j <none> <none> j. j is imaginary unit.
.l <num> <num> log A base B.
.l <num> <none> log A base e.
.m <l:b> <col/num> Filter B for elements x for which A(x) takes its minimal value.
.n <lst> Flatten A to a unnested list.
.n 0 Pi
.n 1 e
.n 2 2 ** 0.5
.n 3 Phi
.n 4 Infinity
.n 5 - Infinity
.n 6 NaN
.p <col/num> All permutations of A.
.q Exit. Immediately ends the program.
.r <col> <seq> Translate each element of A to its cyclic successor in B.
.s <str> <str> Strip from A maximal prefix and suffix of A consisting of characters in B.
.s <seq> <col> Strip from A maximal prefix and suffix of A consisting of elements of B.
.s <seq> <any> Strip from A maximal prefix and suffix of A consisting of copies of B.
.t <lst> <any> Transpose A, padding lines with copies of B.
.t <lst> Transpose, padding with spaces.
.t <num> 0 sin(A)
.t <num> 1 cos(A)
.t <num> 2 tan(A)
.t <num> 3 arcsin(A)
.t <num> 4 arccos(A)
.t <num> 5 arctan(A)
.t <num> 6 A radians in degrees. A * 180 / pi
.t <num> 7 A degrees in radians. A * pi / 180
.t <num> 8 sinh(A)
.t <num> 9 cosh(A)
.t <num> 10 tanh(A)
.t <num> 11 arcsinh(A)
.t <num> 12 arccosh(A)
.t <num> 13 arctanh(A)
.u <l:NY> <seq/num> <any> Cumulative reduce. Reduce B from left to right, with function A(_, _) and C as starting value, and return all intermediate values, starting with C. A takes current value, next element of B as inputs.
.u <l:NY> <any> <none> Cumulative fixed-point. Apply A(_, _) until a result that has occurred before is found. Starting value B. Return all intermediate results, starting with B. A takes current value, iteration number as inputs.
.v <str> Evaluates a pyth expression. Everything after the first expression will be ignored.
.w <dict> <"http"-str> If B starts with "http", perform a request to the URL B, with contents consisting of A's elements joined on '=', joined on '&'. Return as a list of lines.
.w <any> <"http"-str> If B starts with "http", perform a request to the URL B, with contents consisting of A. Return as a list of lines.
.w <lst> <str/none> Write an image. Requires PIL. For color images, A must be a matrix of 3+ element lists. For grayscale, A must be a matrix of integers. File name is B, unless B has no '.', in which case it is B + ".png". If B does not exist, defaults to 'o.png'.
.w <lst> <str/none> Write/append to a file. Write A joined on newlines with a trailing newline to the file B, unless B has no '.', in which case B + '.txt', unless B does not exist, in which case 'o.txt'
.w <any> <str/none> Write/append to a file. Write A with a trailing newline to the file B, unless B has no '.', in which case B + '.txt', unless B does not exist, in which case 'o.txt'
.x <any> <any> Try - catch. A, unless A throws an error, in which case B. B is only evaluated if A throws an error.
.z All input. Take all input from STDIN, return as list of lines.
.{ <col> Convert A to set. If any of A's elements are not hashable, convert all elements to tuples and convert to set.
.{ <num> Set containing A.
.{ <none> Empty set.
.| <int> <int> Bitwise or. | in Python.
.| <col> <col> Set union. Does not preserve input order.