iogii ⸱ Nitty Gritty ⸱ Quick Ref ⸱ Download
Quick Reference (printable)
mathy ops |
+ add |
int int → int |
1 2+ → 3 |
+ add |
char int → char |
'a 1+ → 'b |
+ add |
int char → char |
1 'a+ → 'b |
_ sum |
[int] → int |
1,2,3_ → 6 |
_ sum |
[char] → int |
"ab"_ → 195 |
. prod |
[int] → int |
1,2,3. → 6 |
- sub |
int int → int |
5 3- → 2 |
- sub |
char int → char |
'b 1- → 'a |
- sub |
char char → int |
'b 'a- → 1 |
~ negate |
int → int |
1~ → -1 |
* mult |
int int → int |
2 3* → 6 |
/ div |
int int → int |
7 2/ → 3 |
% mod |
int int → int |
7 2% → 1 |
^ pow |
int int → int |
2 3^ → 8 |
` str |
int → [char] |
5` → "5" |
& chr |
int → char |
97& → 'a |
# toBase |
int int → [int] |
6 2# → [1,1,0] |
#, fromBase |
[int] int → int |
1,1,0 2#, → 6 |
| abs |
int → int |
5~| → 5 |
( pred |
int → int |
4( → 3 |
( pred |
char → char |
'b( → 'a |
) succ |
int → int |
4) → 5 |
) succ |
char → char |
'a) → 'b |
} countTo |
int → [int] |
3} → [1,2,3] |
{ wholes |
[int] |
{ → [0,1,2,... |
char ops |
. read |
[char] → int |
"23". → 23 |
~ readAll |
[char] → [int] |
"1,2 3"~ → [1,2,3] |
| ord |
char → int |
'a| → 97 |
` strip |
[char] → [char] |
" ab\n"` → "ab" |
* retell |
[char] int → [char] |
"ab"3* → "ababab" |
* join |
[[char]] [char] → [char] |
1,2,3 " "* → "1 2 3" |
/ split |
[char] [char] → [[char]] |
"a b c " " "/ → ["a","b","c"] |
% cut |
[char] [char] → [[char]] |
"a b c " " "% → ["a","","b","c",""] |
generic ops |
a append |
[a] [a] → [a] |
"ab" "cd"a → "abcd" |
b backwards reverse |
[a] → [a] |
"abc"b → "cba" |
c cons |
[a] a → [a] |
1,2 0c → [0,1,2] |
d drop |
[a] int → [a] |
"abcde" 2d → "cde" |
g groupWhile |
[a] [b] → [[a]] |
1,2,3,4,5:3%g → [[1,2],[4,5]] |
h head |
[a] → a |
"abc"h → 'a |
j just |
a → [a] |
1j → [1] |
k keep take |
[a] int → [a] |
"abcde" 2k → "ab" |
l len |
[a] → int |
"abc"l → 3 |
n not |
a → int |
0,1,2n → [1,0,0] |
o or |
a a → a |
" bc" '- o → "-bc" |
p priorCount tally |
[a] → [int] |
"aardvark"p → [0,1,0,0,0,2,1,0] |
q equal |
a a → int |
1,2,3 1q → [1,0,0] |
r repeat |
a → [a] |
1r → 1,1,1,1,1,1... |
s sortBy |
[a] [b] → [a] |
"abc","d":len S → ["d","abc"] |
t tail |
[a] → [a] |
"abc"t → "bc" |
u unite concat |
[[a]] → [a] |
"ab","cd","e"u → "abcde" |
v vet filter |
[a] [b] → [a] |
"abcdef":|2%v → "ace" |
w while takeWhile |
[a] [b] → [a] |
"abc def":w → "abc" |
x exclude setDiff |
[a] [a] → [a] |
"abra" "ra"x → "ba" |
y and |
a b → b |
" ab" "123"y → " 23" |
z zenith last |
[a] → a |
"abc"z → 'c |
< lessThan |
a a → int |
1,2,3 2< → [1,0,0] |
? reshape |
[a] int → [[a]] |
"abcdef" 2? → ["ab","cd","ef"] |
\ transpose |
[[a]] → [[a]] |
"abc","def"\ → ["ad","be","cf"] |
folding ops |
i iterate |
a ([a] → [a]) → [a] |
0 i 1,2,3+ → [0,1,3,6] |
e expand iterate0 |
([a] → [a]) → [a] |
e 1,2,3+ → [0,1,3,6] |
f foldr |
a ([a] → [a]) → a |
0 f 1,2,3+ → 6 |
m meld foldr0 |
([a] → [a]) → a |
m 1,2,3+ → 6 |
stack ops |
: dup |
a → a a |
5: → 5 5 |
; mdup |
a (a → b) → b a |
5;1- → 4 5 |
special symbols |
$ | arg | 5;$+ → 10 5 |
! | outer consume | 2 5;!+ → 7 5 |
> | end block | 3;))> → 5 3 |
, | unvec | "ab"j, → ["ab"] |
@ | register | @( 5@) → 4 6 |
[ ] | push pop | 5[( ]) → 4 6 |
= | assignment | 5=a( a) → 4 6 |
ops without short name |
stdin |
[char] |
<stdin> |
!, undefined |
a |
!, → error: undefined |
err error |
[char] → b |
"msg" err → error: msg |
debug ops (short version pops and prints) |
ppi inspect |
a → [char] |
5 inspect → "5" |
ppt type |
a → [char] |
5 type → "int" |
version |
[char] |
version → "pre-alpha" |
low rank overloads |
. pow10 |
int → int |
2. → 100 |
_ countToPow10 |
int → [int] |
2_ → [1,2,...,100] |
? replicate |
int a → [a] |
4 3? → [3,3,3,3] |
\ digits |
int → [int] |
123 \ → [1,2,3] |
u undigits |
[int] → int |
1,2,3 u → 123 |