Skip to content

Latest commit

 

History

History
1092 lines (870 loc) · 25.6 KB

File metadata and controls

1092 lines (870 loc) · 25.6 KB

K Primitive Reference for Implish

#+tanco-format: 0.2

This file catalogs all K primitives and their proposed English names for implish. Each primitive shows examples from the K language (oK manual) for reference.

Arithmetic Operators

plus : plus (dyadic +)

> plus[3; 4 5 6]
7 8 9
> plus["ab"; 5]
102 103

Dyadic + is addition. Fully atomic.

flip : flip (monadic +:)

> flip [1 2; 3 4]
[[1, 3] [2, 4]]
> flip [5; 3 4]
[[5, 3] [5, 4]]

Monadic +: is transpose/flip. Takes the transpose of matrices. Atoms are spread to match the dimension of other columns.

minus : minus (dyadic -)

> minus[23 9; 5 10]
18 -1

Dyadic - is subtraction. Fully atomic.

negate : negate (monadic -:)

> negate 4 -10 8
-4 10 -8
> negate "b"
-98

Monadic -: flips the sign of numbers. Right atomic.

times : times (dyadic *)

> times[5 0 -3; 2 2 1]
10 0 -3

Dyadic * is multiplication. Fully atomic.

first : first (monadic *:)

> first 5 19 8
5

Monadic *: extracts the first element of a list.

first-dict : first-dict (monadic *: for dictionaries)

> first :[`a 23; `b 34]
23

NOTE: K dictionaries use [a:val; b:val] syntax. Implish may use different dictionary syntax. This extracts the first value from a dictionary.

divide : divide (dyadic %)

> divide[2 20 9; 0.5 10 2]
4 2 4.5

Dyadic % is division. Fully atomic.

sqrt : sqrt (monadic %:)

> sqrt 25 7 100
5 2.6457513110645907 10

Monadic %: is square root. Right atomic.

mod : mod (dyadic !)

> mod[3; 34 2 8]
1 2 2

Dyadic ! with positive left arg is modulo. Right atomic.

div : div (dyadic ! with negative left)

> div[-3; 5 6 27]
1 2 9

Dyadic ! with negative left arg divides y by x and truncates. Right atomic.

map : map (dyadic ! for making dictionaries)

> map[`a `b; 3 4]
:[`a 3; `b 4]
> map[4 5; 6 7]
[4 5 ! 6 7]

Dyadic ! can make a dictionary from x keys and y value(s). NOTE: May not translate directly to implish dictionary syntax.

int : int (monadic !:)

> int 5
0 1 2 3 4
> int -3
-3 -2 -1

Monadic !: generates a range from 0 up to but excluding N. If N is negative, count up and exclude zero. (NOTE: Already implemented as ! in implish)

odometer : odometer (monadic !: for lists)

> int 2 3
[0 0 0 1 1 1, 0 1 2 0 1 2]

Monadic !: on a list generates ranged permutations (odometer/cartesian product).

keys : keys (monadic !: for dictionaries)

> keys :[`a 3; `b 4]
`a `b

Monadic !: on a dictionary returns list of keys. NOTE: Depends on implish dictionary implementation.

Comparison Operators

less : less (dyadic <)

> less[2 3 5; 1 0 6]
0 0 1

Dyadic < tests less-than. Fully atomic. Returns boolean (0 or 1).

asc : asc (monadic <:)

> asc 5 8 2 7
2 0 3 1

Monadic <: is “grade up” or ascending sort indices. Generates a permutation vector which would sort argument into ascending order.

asc-dict : asc-dict (monadic <: for dictionaries)

> asc :[`a 2; `b 5; `c 1]
`c `a `b

Monadic <: on dictionaries sorts keys by their values.

more : more (dyadic >)

> more[2 3 5; 1 0 6]
1 1 0

Dyadic > tests greater-than. Fully atomic. Returns boolean (0 or 1).

desc : desc (monadic >:)

> desc 5 8 2 7
1 3 0 2

Monadic >: is “grade down” or descending sort indices. Generates a permutation vector which would sort argument into descending order.

desc-dict : desc-dict (monadic >: for dictionaries)

> desc :[`a 2; `b 5; `c 1]
`b `a `c

Monadic >: on dictionaries sorts keys by their values (descending).

equal : equal (dyadic =)

> equal[3 4 6; 6]
0 0 1

Dyadic === tests equality. Fully atomic. Returns boolean (0 or 1).

group : group (monadic =:)

> group `c `a `b `b `a `c `a
:[`c 0 5; `a 1 4 6; `b 2 3]

Monadic : generates a dictionary from items to the indices where they were found. NOTE: Depends on implish dictionary implementation.

identity-matrix : identity-matrix (monadic =: for numbers)

> identity-matrix 3
[1 0 0, 0 1 0, 0 0 1]

Monadic : on a number generates an NxN identity matrix.

Logical/Bitwise Operators

min : min (dyadic &)

> min[3 5 7; 0 6 9]
0 5 7

Dyadic & is minimum. Fully atomic. For booleans, effectively logical AND.

where : where (monadic &:)

> where 2 3 1
0 0 1 1 1 2
> where 1 0 0 1 0 1
0 3 5

Monadic &: makes N copies of sequential indices. For boolean lists, gathers indices of nonzero elements.

where-dict : where-dict (monadic &: for dictionaries)

> where map[`a `b `c; 1 0 2]
`a `c `c

Monadic &: indexes dictionary keys by where of values.

max : max (dyadic |)

> max[3 5 7; 0 6 9]
3 6 9

Dyadic | is maximum. Fully atomic. For booleans, effectively logical OR.

reverse : reverse (monadic |:)

> reverse "ABDEF"
"FEDBA"

Monadic |: reverses a list.

reverse-dict : reverse-dict (monadic |: for dictionaries)

> reverse :[`a 3; `b 4]
:[`b 4; `a 3]

Monadic |: reverses both keys and values in a dictionary.

match : match (dyadic ~)

> match[(`a; 2 3 4); (`a; 2 3)]
0
> match[(`a; 2 3 4); (`a; 2 3 4)]
1

Dyadic ~ tests if x and y are recursively identical. Returns 1 if they match exactly, 0 otherwise.

not : not (monadic ~:)

> not [0 1; 3 7 -1]
[1 0, 0 0 0]

Monadic ~: is logical not. Nonzero numbers become 0, zero becomes 1. Right atomic.

not-dict : not-dict (monadic ~: for dictionaries)

> not :[`a [2, 0]; `b 1]
:[`a [0, 1]; `b 0]

Monadic ~: applies to the values of dictionaries.

List Construction

concat : concat (dyadic ,)

> concat[1; 2 3]
1 2 3
> concat[2; 3]
2 3
> concat[1; nil]
1

Dyadic , joins together lists or atoms to produce a list.

concat-dict : concat-dict (dyadic , for dictionaries)

> concat[:[`a 1; `b 3]; :[`b 5; `c 7]]
:[`a 1; `b 5; `c 7]

Concatenating dictionaries favors values of y (right argument).

enlist : enlist (monadic ,:)

> enlist 1 2 3
[1 2 3]

Monadic ,: places item in a 1-length list (enlistment).

count : count (monadic #:)

> count 4 7 10
3
> count "c"
1

Monadic #: counts elements. Atoms have count 1.

count-dict : count-dict (monadic #: for dictionaries)

> count :[`a 3; `b 17]
2

Monadic #: counts key-value pairs in dictionaries.

take : take (dyadic #)

> take[2; "ABC"]
"AB"
> take[6; "ABC"]
"ABCABC"
> take[-2; "ABC"]
"BC"

Dyadic # truncates or repeats y to produce a list of length x. Negative x takes from the end of y.

take-dict : take-dict (dyadic # with list and dict)

> take["fb"; map["fab"; 3 5 9]]
map["fb"; 3 9]

Dyadic # selects elements from dictionary keyed in x. NOTE: Not yet implemented. The take function currently only handles integer counts. Need to extend take to handle string/list of keys as left argument when right is dictionary.

reshape : reshape (dyadic # with list shapes)

> reshape[3 2; 1 2 3]
[1 2, 3 1, 2 3]
> reshape[3 2 2; 1 2 3]
[[1 2, 3 1] [2 3, 1 2] [3 1, 2 3]]

Dyadic # with list left argument creates arbitrary dimensioned result. Produces strands (INTs/NUMs/SYMs) at the innermost level for vector inputs.

reshape-maximal : reshape-maximal (dyadic # with 0N in shape)

> reshape[0N 3; int 6]
[0 1 2, 3 4 5]
> reshape[2 0N; int 8]
[0 1 2 3, 4 5 6 7]

If leading or trailing element of a length-2 rank vector is 0N, reshape treats that dimension as maximal. Produces strands at the innermost level.

filter : filter (dyadic # with function)

> filter[{mod[2; x]}; int 8]
1 3 5 7
> filter[{min / x}; (1 0 1 1; 1 1; 0 1 0; 1 2 1)]
(1 1; 1 2 1)
> filter[{match[x; reverse x]}; ("racecar"; "nope"; "bob")]
("racecar"; "bob")

Dyadic # with monadic function m filters list by applying m to each element. Equivalent to at[l; where each[m; l]]. NOTE: Not yet implemented. Requires adverbs (each, /) and higher-order function support.

filter-dict : filter-dict (dyadic # with function and dict)

> filter[{mod[2; x]}; map["abcdef"; 2 3 4 5 6 7]]
map["bdf"; 3 5 7]

Dictionaries are filtered by their values and result in dictionaries. NOTE: Not yet implemented. Depends on filter being implemented first.

drop : drop (dyadic _)

> drop[3; "ABCDE"]
"DE"
> drop[-3; "ABCDE"]
"AB"

Dyadic _ removes x elements from the start of y. Negative x drops from the end.

drop-dict : drop-dict (dyadic _ with list and dict)

> drop[`b `e; map[`a `b `c; 3 5 9]]
map[`a `c; 3 9]

Dyadic _ filters out keys from a dictionary. NOTE: Not yet implemented. The drop function currently only handles integer counts. Need to extend drop to handle list of keys as left argument when right is dictionary.

cut : cut (dyadic _ with list indices)

> cut[0 4; "feedface"]
["feed" "face"]
> cut[1 2 4; "feedface"]
["e" "ed" "face"]

Dyadic _ with list of indices splits y at those indices. Indices must be ascending.

filter-out : filter-out (dyadic _ with function)

> filter-out[{mod[2; x]}; int 8]
0 2 4 6
> filter-out[{min / x}; (1 0 1 1; 1 1; 0 1 0; 1 2 1)]
(1 0 1 1; 0 1 0)
> filter-out[{match[x; reverse x]}; ("racecar"; "nope"; "bob")]
("nope")

Dyadic _ with monadic function m filters out elements where m returns truthy. Equivalent to at[l; where not each[m; l]]. NOTE: Not yet implemented. Requires adverbs and higher-order function support.

filter-out-dict : filter-out-dict (dyadic _ with function and dict)

> filter-out[{mod[2; x]}; map["abcdef"; 2 3 4 5 6 7]]
map["ace"; 2 4 6]

Dictionaries are filtered-out by their values. NOTE: Not yet implemented. Depends on filter-out being implemented first.

floor : floor (monadic _:)

> floor 2.3 7.6 9 -2.3
2 7 9 -3

Monadic _: is floor function. Right atomic.

lowercase : lowercase (monadic _: for characters)

> lowercase "ABCdef!"
"abcdef!"

Monadic _: converts characters to lowercase. Right atomic.

List Operations

null : null (monadic ^:)

> null? [5; `; 0N]
0 1 1

Monadic ^: tests if item is null. Right atomic. Returns 1 for null values (` or 0N), 0 otherwise.

except : except (dyadic ^)

> except[1 3 2 5 1 2 3; 1 3 5]
2 2

Dyadic ^ removes all instances of each item in y from x.

fill : fill (dyadic ^ with atom left)

> fill["c"; [5; `; 0N]]
[5 "c" "c"]

Dyadic ^ replaces all nulls in y with x.

distinct : distinct (monadic ?:)

> distinct [[`a `b]; 3; [`a `b]; 7; 3]
[[`a `b] 3, 7]

Monadic ?: produces a list of unique elements.

random-floats : random-floats (monadic ?: for numbers)

> random-floats 6
0.197 0.8382 0.1811 0.9084 0.6113 0.1958

Monadic ?: on a number produces x random floats from 0 up to but excluding 1. (Note: actual values will vary) NOTE: Not yet implemented. Need to add random-floats function.

find : find (dyadic ?)

> find["XYZ"; "XYXZB"]
0 1 0 2 0N

Dyadic ? determines the index of y in x. Returns 0N if not found. Right atomic. For strings, treats them as character arrays.

find-dict : find-dict (dyadic ? with dict)

> find[map[`a `b `c `d; 23 14 9 5]; 9 14]
`c `b

Dyadic ? on dictionaries looks up the key associated with the value y. Right atomic.

random : random (dyadic ? with numbers)

> random[5; 10]
0 3 3 7 7
> random[5; 10]
3 5 2 7 9

Dyadic ? with numbers produces x random integers from 0 up to but excluding y. (Note: actual values will vary) NOTE: Not yet implemented. Need to add random number generation.

random-pick : random-pick (dyadic ? with list)

> random-pick[8; "ABC"]
"ACBBCBCB"

Dyadic ? picks x random elements from list y. (Note: actual values will vary) NOTE: Not yet implemented. Depends on random being implemented first.

random-chars : random-chars (dyadic ? with character)

> random-chars[10; "A"]
"GHIJKLMNOP"
> random-chars[10; "0"]
"0123456789"

Dyadic ? with character picks random elements from the 26 characters including and up from that char. (Note: actual values will vary) NOTE: Not yet implemented. Depends on random being implemented first.

random-distinct : random-distinct (dyadic ? with negative count)

> random-distinct[-5; 10]
3 7 1 9 2
> random-distinct[-8; "ABC"]
"CABCABCA"

For n ? n or n ? l, if x is negative, pick abs(x) distinct items. (Note: actual values will vary) NOTE: Not yet implemented. Depends on random being implemented first.

Type and Conversion

type : type (monadic @:)

> type `a
-11
> type "d"
-10
> type nil
0

Monadic @: returns a magic number indicating the type of the noun. General lists are 0, listy things are positive, non-listy things are negative.

at : at (dyadic @)

> at[3 7 8; 0 1 1]
3 7 7
> at[negate; 5]
-5

Dyadic @ indexes a list or applies single argument to a function. Invalid indices produce 0N. NOTE: Function application works for built-in functions but not yet for implish functions (would need evaluator context).

at-dict : at-dict (dyadic @ with dict)

> at[map[`a `b; 4 7]; `a]
4

Dyadic @ indexes a dictionary. Invalid keys produce nil (which doesn’t print in REPL; K would produce 0N).

string : string (monadic $:)

> string 120 4
["120" "4"]
> string `beef
"beef"

Monadic $: converts atoms into strings. Right atomic.

pad : pad (dyadic $)

> pad[5; "beef"]
"beef "
> pad[-7; "beef"]
"   beef"

Dyadic $ adjusts strings to x characters long. Under length: right-pad with spaces. Over length: strip from end. Negative x pads/strips from left. NOTE: Current implementation only handles single strings, not lists of strings with different padding lengths.

cast : cast (dyadic $ with symbol)

> cast[`i; "Hello."]
72 101 108 108 111 46
> cast[`c; 72 101 108 108 111 46]
"Hello."
> cast[`f `i `b; 31]
[31, 31, 1]

Dyadic $ converts values to different types based on a symbol. Fully atomic. Conversion symbols: `c (char), `i (int), `f (float), `b (bool), ` (str to sym).

value : value (monadic .:)

> value "1 + 2"
3

Monadic .: evaluates implish expressions from strings.

value-dict : value-dict (monadic .: for dict)

> value map[`a `b; 11 22]
11 22

Monadic .: gives the values of a dictionary.

value-func : value-func (monadic .: for function)

> value {plus[x; y]}
[in: {match[x; y]; not null find[y; x]}]

Monadic .: gives the bound environment of a function as a dictionary (oK-specific). NOTE: Not yet implemented. This is oK-specific functionality that may not apply to implish.

dot-apply : dot-apply (dyadic .)

> dot-apply[[2 3; 4 5]; 1 0]
4
> dot-apply[{concat[x; times[2; y]]}; 3 5]
3 10

Dyadic . indexes at depth or applies a list of arguments to a function. NOTE: Not yet implemented. Need to add dot-apply for deep indexing and function application.

bind : bind (dyadic . with function and dict)

> f: bind[{a +:: x}; map[`a; 100]]
{[x] a::. `a plus x}
> at[f; 5]
105
> at[f; 20]
125
> value f
map[`a; 125]

Dyadic . treats the dictionary as new global scope for function (oK-specific). NOTE: Not yet implemented. This is oK-specific functionality for binding closures.

Adverbs (Suffixes)

each : each (monadic ‘)

> each[{times[2; x]}; 5 7 2]
10 14 4

Monadic ' applies the monad to each element, producing a new list. If x is an atom, this is equivalent to at[m; a].

each2 : each-dyad (dyadic ‘)

> each2[{concat[x; times[2; y]]}; 2 7 9; 1 3 4]
[2 2, 7 6, 9 8]
> each2[concat; 5; 1 3 4]
[5 1, 5 3, 5 4]

Dyadic ' pairs up values from x and y and applies them to the dyad. If x or y is an atom, spread it to the elements of the other sequence.

eachprior : eachprior (dyadic ‘:)

> eachprior[equal; 3 3 4 4 5]
0 1 0 1 0
> eachprior[minus; 1 3 5 2 9]
1 2 2 -3 7
> eachprior[concat; 2 3 4]
((2); (3 2); (4 3))

Dyadic ': applies dyad to each element (left) and preceding element (right). First element paired with 0N, or special initial values for plus, times, minus, min (0, 1, 0, first element). Comma concat provided with only 1 parameter for first element.

eachprior-init : eachprior-init (dyadic ‘: with initial value)

> eachprior[concat; 99; 2 3 4]
(2 99; 3 2; 4 3)

Dyadic ': with atom left specifies explicit initial value for eachprior.

stencil : stencil (monadic ‘: with count)

> stencil[{over[join; string x]}; 3; 11 22 33 44]
("112233"; "223344")

Monadic ': with number applies monad to overlapping windows of specified size. Convenience for “each window”.

eachright : eachright (dyadic /:)

> eachright[concat; 2 3; 4 5 6]
(2 3 4; 2 3 5; 2 3 6)

Dyadic /: applies dyad to entire left argument and each right argument.

eachleft : eachleft (dyadic \:)

> eachleft[concat; 2 3; 4 5 6]
(2 4 5 6; 3 4 5 6)

Dyadic \: applies dyad to each left argument and entire right argument.

over : over (dyadic /)

> over[plus; 4 5 2]
11

Dyadic / is fold/reduce. Applies dyad left-to-right, carrying result forward. Special initial values for empty lists: plus → 0, times → 1, max → -∞, min → +∞.

over-init : over-init (dyadic / with initial value)

> over[plus; 4; 5 2]
11

Dyadic / with initial value x applies fold starting from x.

fixedpoint : fixedpoint (monadic /)

> fixedpoint[{divide[floor x; 2]}; 32]
0

Monadic / repeatedly applies monad until value stops changing or repeats initial value.

for : for (monadic / with count)

> for[enlist; 5; 7]
(((((7)))))

Monadic / with number applies monad x times.

while : while (monadic / with condition)

> while[{less[x; 100]}; {times[x; 2]}; 1]
128

Monadic / with two monads applies right monad while left monad returns true.

scan : scan (dyadic \)

> scan[plus; 4 5 6]
4 9 15

Dyadic \ is scan. Like over/fold, but accumulates intermediate results.

scan-init : scan-init (dyadic \ with initial value)

> scan[times; 2; 3 2 9]
6 12 108

Dyadic \ with initial value x starts scan from x. Note: initial value not included in results.

scan-fixedpoint : scan-fixedpoint (monadic \)

> scan-fixedpoint[{divide[floor x; 2]}; 32]
32 16 8 4 2 1 0
> scan-fixedpoint[{mod[3; plus[1; x]]}; 2]
2 0 1

Monadic \ repeatedly applies monad until stops changing, accumulating results.

scan-for : scan-for (monadic \ with count)

> scan-for[enlist; 5; 7]
(7; (7); ((7)); (((7))); ((((7)))); (((((7))))))

Monadic \ with number applies monad x times, accumulating results.

scan-while : scan-while (monadic \ with condition)

> scan-while[{less[x; 100]}; {times[x; 2]}; 1]
1 2 4 8 16 32 64 128

Monadic \ with two monads applies while condition true, accumulating results.

verbs that reuse adverb symbols in k

bin : bin (dyadic ’ for lists)

> bin[0 2 4 6 8 10; 5]
2
> bin[0 2 4 6 8 10; -10 0 4 5 6 20]
-1 0 2 2 3 5

Dyadic ' with list left argument performs binary search for y in x. x must already be sorted. Right atomic.

join : join (dyadic / with atom/list)

> join["|"; ["a"; "bc"; "def"]]
"a|bc|def"

Dyadic / with character/string joins strings with separator. NOTE: Use square brackets for lists in implish.

encode : encode (dyadic / with lists)

> encode[2 2 2; 1 0 1]
5
> encode[10 10 10; 3 4 5]
345

Dyadic / combines digits y in base x into single value.

split : split (dyadic \ with atom/list)

> split[","; "cat,dog,banana"]
["cat" "dog" "banana"]

Dyadic \ breaks string y at instances of character x.

decode : decode (dyadic \ with lists)

> decode[2 2 2; 5]
1 0 1
> decode[10 10 10; 345]
3 4 5

Dyadic \ splits number y into base x representation.

window : window (dyadic ‘: with number)

> window[3; int 5]
[0 1 2, 1 2 3, 2 3 4]
> window[2; int 5]
[0 1, 1 2, 2 3, 3 4]

Dyadic ': creates sliding window of length x from y. If x < 0: equivalent to window[3; concat[0; concat[y; 0]]]. If x = 0: equivalent to reshape[plus[1; count y]; nil].

Special Forms

splice : splice (ternadic ?)

> splice[1 2 3; 1 1; 4]
1 4 2 3
> splice["test"; 1 3; "u"]
"tut"
> splice["hello world"; 0 5; "goodbye"]
"goodbye world"

Ternadic ? replaces elements in interval [start end] with value. NOTE: May require special parsing in implish.

splice-transform : splice-transform (ternadic ? with function)

> splice[2 7 9; 1 2; times[2]]
2 14 9
> splice["a look back"; 2 6; reverse]
"a kool back"

If third arg is monadic function, applies to interval instead of replacing. NOTE: K uses {times[2; x]} lambda syntax, implish uses partial application times[2].

try : error-trap

> try[plus; [1; 2]]
[0, 3]
> try[plus; [`a; 2]]
[1 "expected number or vector, got: SYM"]

Calls function with args, catches errors. Returns [0; result] on success, [1; error-message] on failure. NOTE: K uses {plus[1; x]} lambda syntax with single arg (1). Implish uses plus with arg list [1; 2].

cond : cond (special $)

> cond[1; "A"; 0; "B"; "C"]
"A"
> cond[0; "A"; 0; "B"; "C"]
"C"

The symbol $ with 3+ arguments is cond (like Lisp cond). Considers arguments in pairs: if first is truthy, return second. Else continue. If no conditions match, return final value. NOTE: Already described in ok-manual but under special section, not verbs. Truthy: anything except 0, 0x00, or nil.

Named Builtins

sin : sin (monadic)

> sin 0 0.5 3.141
0 0.479425538604203 0.0005926535550994539

Monadic sin calculates sine. Atomic.

cos : cos (monadic)

> cos 0 0.5 3.141
1 0.8775825618903728 -0.9999998243808664

Monadic cos calculates cosine. Atomic.

exp : exp (monadic)

> exp 1 5 12
2.718281828459045 148.4131591025766 162754.79141900392

Monadic exp calculates exponential (e^x). Atomic.

log : log (monadic)

> log 2.7183 5 10
1.0000066849139877 1.6094379124341003 2.302585092994046

Monadic log calculates natural logarithm. Atomic.

prm : prm (monadic)

> prm "AB"
["AB" "BA"]
> prm 3
[0 1 2, 0 2 1, 1 0 2, 1 2 0, 2 0 1, 2 1 0]

Monadic prm generates all permutations of items in list. If x is a number, treats as int x.

in : in (dyadic)

> in[1 3 7; 1 2 3 4 5]
1 1 0

Dyadic in tests membership. Is x a member of y? Left-atomic.

Symbol Aliases

Once the English-named primitives are implemented, add these symbol aliases:

Arithmetic

  • + alias for plus
  • +: alias for flip
  • - alias for minus
  • -: alias for negate
  • * alias for times
  • *: alias for first
  • %=alias for =divide
  • %: alias for sqrt
  • ! alias for mod/div/map (ambivalent based on left arg sign)
  • !: alias for int/odometer/keys (ambivalent based on arg type)

Comparison

  • < alias for less
  • <: alias for asc
  • > alias for more
  • >: alias for desc
  • === alias for equal
  • ==:= alias for group/identity-matrix (ambivalent based on arg type)

Logical

  • & alias for min
  • &: alias for where
  • | alias for max
  • |: alias for reverse
  • ~ alias for match
  • ~: alias for not

List Construction

  • , alias for concat
  • ,: alias for enlist
  • # alias for take/reshape/filter (ambivalent based on arg types)
  • #: alias for count
  • _ alias for drop/cut/filter-out (ambivalent based on arg types)
  • _: alias for floor/lowercase (ambivalent based on arg type)

List Operations

  • ^ alias for except/fill (ambivalent based on left arg)
  • ^: alias for null
  • ? alias for find/random/random-pick (ambivalent)
  • ?: alias for distinct/random-floats (ambivalent)

Type/Conversion

  • @ alias for at
  • @: alias for type
  • $ alias for pad/cast (ambivalent)
  • $: alias for string
  • . alias for dot-apply/bind (ambivalent)
  • .: alias for value

Adverbs (already use symbols)

  • ' (each, each-dyad, bin)
  • ': (eachprior, stencil, window)
  • / (over, fixedpoint, for, while, join, encode)
  • \ (scan variants, split, decode)
  • /: (eachright)
  • \: (eachleft)