Codish Lexicon
One word for one meaning, One meaning for one word,
Symmetric opposites, Comprehensive classes.
A dictionary of computer programming names.
map
— a function that returns the respective values for an linear collection of keys and a transitive function. commute: each python: map(function, sequence[, sequence, ...])
each — to return an ordered linear collection corresponding to the respective values from a given linear collection and a relation. commute: map perl: [hash]: retrieve the next key/value pair from a hash† php: return the current key and value pair from an array and advance the array cursor &dagger. mentioned: group, transpose ✍
iterable — an interface for objects that can be iterated. attrs: for each, map, all, any, some, every, count, where, filter, group, bale related: iter, ordered classes: iter, iteration mentioned: bound, destructure, max, min, product, reversed, stream, sum ✍
linear — having 1 dimension. an array is a linear collection. related: scalar, planar, spatial, temporal aka: planar ✍
collection — a class of compound objects that contain and organize values. attrs: len, has, get, set, reset, getset, put, del, cut, insert, remove, discard, empty, erase classes: linear collection, planar collection, spatial collection seuss: que classes: dict related: compound ✍
key — an object that one can index into a collection to retrieve a value. php: fetch a key from an array &dagger. related: dict aka: id distinct: pos ✍
transitive function — concept: a unary function that consistently returns the corresponding value in a range for a given key in a domain. distinct: relation, binary relation, transitive relation ✍
abs
— absolute value. returns the positive reflection of negative integers, returning positive numbers as they were. a transitive function that maps integers into the natural number line. distinct: absolute is: stateless, idempotent related: neg python: abs(number)
binary relation — concept: a binary function that returns whether the parameters have a given relationship (source to target), useful for map and for constructing graphs. is: binary function, relation distinct: boolean function includes: eq, ne, lt, gt, le, ge distinct: transitive function classes: eq, ge, gt, le, lt, ne, transitive relation related: relation mentioned: equivalence relation, inherits, is, judge, normal, orthogonal, skew ✍
enumerate
— to assign nominal values to each respective value in a list, effectively creating the map that relates each ordinal offset in a list with its respective value. python: enumerate(iterable)
equivalence relation — concept: a binary relation that returns whether two values are equivalent for some notion of equivalence, like having the same value (eq), identical ref (is), some common attribute, or maping to the same value with a transitive function, like len. see: eq, is aka: same mentioned: group, unique ✍
zip with — a shortcut provided in (haskell) among other functional programming languages for composing zip and map variadically. related: zip ✍
in the following notation, the "\" character declares a function as an expression and "*" is used as in python for variadic args and parameters.
identity:
tuple
— a linear collection of fixed length. tuples are generally used for records or structures where the value at each index has a particular meaning, but no name, distinguishing it from an object or class of objects (haskell) (python). includes: nuple, single, duple, triple, quadruple, quintuple, sextuple, septuple, octuple, nonuple, decuple, undecuple, duodecuple python: tuple()
| length | name |
|---|---|
| 0 | nuple |
| 1 | single |
| 2 | duple |
| 3 | triple |
| 4 | quadruple |
| 5 | quintuple |
| 6 | sextuple |
| 7 | septuple |
| 8 | octuple |
| 9 | nonuple |
| 10 | decuple |
| 11 | undecuple |
| 12 | duodecuple |
| 13 | tredecuple |
| 14 | quattuordecuple |
| 15 | quindecuple |
| 16 | sexdecuple |
| 17 | septendecuple |
| 18 | octodecuple |
| 19 | novemdecuple |
| 20 | vigenuple |
| 21 | unvigenuple |
| 22 | duovigenuple |
| 23 | trevigenuple |
| 24 | quattuorvigenuple |
| 25 | quinvigenuple |
| 26 | sexvigenuple |
| 27 | septenvigenuple |
| 28 | octovigenuple |
| 29 | novemvigenuple |
| 30 | trigenuple |
| 31 | untrigenuple |
| 32 | duotrigenuple |
| 33 | tretrigenuple |
| 34 | quattuortrigenuple |
| 35 | quintrigenuple |
| 36 | sextrigenuple |
| 37 | septentrigenuple |
| 38 | octotrigenuple |
| 39 | novemtrigenuple |
| 40 | quadragenuple |
| 41 | unquadragenuple |
| 42 | duoquadragenuple |
| 43 | trequadragenuple |
| 44 | quattuorquadragenuple |
| 45 | quinquadragenuple |
| 46 | sexquadragenuple |
| 47 | septenquadragenuple |
| 48 | octoquadragenuple |
| 49 | novemquadragenuple |
| 50 | quinquagenuple |
| 51 | unquinquagenuple |
| 52 | duoquinquagenuple |
| 53 | trequinquagenuple |
| 54 | quattuorquinquagenuple |
| 55 | quinquinquagenuple |
| 56 | sexquinquagenuple |
| 57 | septenquinquagenuple |
| 58 | octoquinquagenuple |
| 59 | novemquinquagenuple |
| 60 | sexagenuple |
| 61 | unsexagenuple |
| 62 | duosexagenuple |
| 63 | tresexagenuple |
| 64 | quattuorsexagenuple |
| 65 | quinsexagenuple |
| 66 | sexsexagenuple |
| 67 | septensexagenuple |
| 68 | octosexagenuple |
| 69 | novemsexagenuple |
| 70 | septuagenuple |
| 71 | unseptuagenuple |
| 72 | duoseptuagenuple |
| 73 | treseptuagenuple |
| 74 | quattuorseptuagenuple |
| 75 | quinseptuagenuple |
| 76 | sexseptuagenuple |
| 77 | septenseptuagenuple |
| 78 | octoseptuagenuple |
| 79 | novemseptuagenuple |
| 80 | octogenuple |
| 81 | unoctogenuple |
| 82 | duooctogenuple |
| 83 | treoctogenuple |
| 84 | quattuoroctogenuple |
| 85 | quinoctogenuple |
| 86 | sexoctogenuple |
| 87 | septoctogenuple |
| 88 | octooctogenuple |
| 89 | novemoctogenuple |
| 90 | nonagenuple |
| 91 | unnonagenuple |
| 92 | duononagenuple |
| 93 | trenonagenuple |
| 94 | quattuornonagenuple |
| 95 | quinnonagenuple |
| 96 | sexnonagenuple |
| 97 | septennonagenuple |
| 98 | octononagenuple |
| 99 | novemnonagenuple |
| 100 | centuple |
| 200 | bicentuple |
| 300 | tricentuple |
| 400 | quadricentuple |
| 500 | quincentuple |
| 600 | sexcentuple |
| 700 | septemcentuple |
| 800 | octocentuple |
| 900 | novemcentuple |
| 1,000 | millenuple |
| 2,000 | bimillenuple |
| 3,000 | trimillenuple |
| 4,000 | quadrimillenuple |
| 5,000 | quinmillenuple |
| 6,000 | sexmillenuple |
| 7,000 | septemmillenuple |
| 8,000 | octomillenuple |
| 9,000 | novemmillenuple |
| 10,000 | decemmillenuple |
zip
— return a list of lists of the respective values from given lists. perform a transpose of the given arguments. related: transpose, zip with distinct: merge in a shell python: zip(seq1 [, seq2 [...]])
zip([1, 2, 3], [4, 5, 6]) eq [[1, 4], [2, 5], [3, 6]]
zip([1, 2, 3], [4, 5]) eq [[1, 4], [2, 5]]
zip([1, 2], [4, 5, 6]) eq [[1, 4], [2, 5]]
item — a key and corresponding value. distinct: attr related: dict, pair mentioned: complete, cut, has value, hash array, items, record, set, update ✍
attr — an attribute of an object. a setable and getable value associated with a symbol or name in an object. in some languages, attributes are either private, protected, or public. distinct: item python: property c++: member aka: member, property related: pair ✍
items
— returns a collection of key to value items (aka duples, pairs) for a dict. python: dict: D.items()
relation — a "finitary relation". a function of a particular number of arguments that returns whether the arguments have a particular relationship. related: binary relation, transitive relation distinct: transitive function classes: binary relation aka: mapping mentioned: bound, complexity function, dict, each, range, ternary relation ✍
group — a collection of equivalent objects for a given equivalence relation. a function that groups values into bags keyed by the results of a transitive function on each value. the returned object is a dict of sets. aka: equivalence class distinct: class pertains: iterable mentioned: duck, genericity, interface, unit, zero ✍
transpose — to return a 2 dimensional collection where each row corresponds to the col of another 2 dimensional collection. related: zip aka: unzip inverse: transpose ✍
transpose([[1, 2, 3], [4, 5, 6]]) eq [[1, 4], [2, 5], [3, 6]]
transpose([[1, 2, 3], [4, 5]]) eq [[1, 4], [2, 5]]
transpose([[1, 2], [4, 5, 6]]) eq [[1, 4], [2, 5]]
pythonic idiom: items = [(0, 'a'), (1, 'b')]
numbers, letters = zip(*items)
all
— returns whether all values froma given iterable are true. short circuits on the first falsy value. related: any, every python: all(iterable)
any
— returns whether any value from a given iterable is true. short circuits on the first truthy value. related: all, some python: any(iterable)
some — returns whether any value in an iterable is produces a truthy value when passed through a given transitive function. short circuits on the first truthy value. related: any, every pertains: iterable ✍
every — returns whether all values in an iterable produce a truthy value when passed through a given transitive function. short circuits on the first falsy value. related: all, some pertains: iterable mentioned: complete ✍
count
— a stateful destructive operation that returns the number of values in an iteration. distinct: length python: list: L.count(value)
where — to return a stable list containing all of the values from a given list that pass a given condition. distinct: filter aka: array filter, grep pertains: iterable mentioned: transpose ✍
filter
— to return a stable copy of a list omitting all of the values that fail a given condition (boolean function). distinct: where python: filter(function or None, sequence)
bale — transforms an iterable into a list of accumulated sub-lists of a given length. related: zip, add aka: xargs pertains: iterable ✍
baled([1, 2, 3, 4]) eq [[1, 2], [3, 4]]
baled([1, 2, 3, 4, 5, 6], 3) eq [[1, 2, 3], [4, 5, 6]]
baled([1, 2, 3, 4, 5], 3) eq [[1, 2, 3], [4, 5]]
baled([1, 2, 3, 4, 5], 3, 0) eq [[1, 2, 3], [4, 5, 0]]
shell idiom: input | xargs -n 2
iter
— to iterate, or return an iteration. is: iterable python: iter(collection)
ordered — pertains to collections that maintain the respective order of their contents. interfaces: list, queue, deque, stack attrs: push, pop, shift, unshift, first, last, begins, ends, trim left, trim right, rot left, rot right, chip, chop, erase implementations: array, chain related: sorted, unordered related: iterable ✍
| left | right |
|---|---|
| unshift | push |
| shift | pop |
| first | last |
| begins | ends |
| trim left | trim right |
| rot left | rot right |
| chip | chop |
iteration — an object that represents the state of a lazy iteration and implements a next function to advance the cursor and return the next value of the iteration. an iteration walks from the begin to the end of a lazy ordered linear collection, providing each value on demand. attrs: next is: iterable classes: stream mentioned: iter ✍
interface — a group of interchangeable objects because they explicitly subscribe to a common base interface that defines the behaviors for some common attributes. distinct: duck, class, type mentioned: heap array, iterable, polymorphism, trie ✍
bound — accepts an iterable and returns the value closest to a boundary given a judge, an optional relation, and an optional base value from which to start. mentioned: bounder, greater, less ✍
destructure — to assign a compound value's contents to the respective slots of a compound lvalue. in {python}, this is known as "unpacking" and applies to iterable values assigned to tuple expressions. in {javascript}, destructuring applies to both {Object} and {Array} values and lvalues. distinct: unpack ✍
python example: a, b = b, a
python example: a, b = range(2); a == 0; b == 1
javascript example: var [a, b] = [1, 2]; a == 1; b == 2
javascript example: var {a: b} = {a: 10}; b == 10
max
— returns the greatest value from a given iterable. related: gt opposite: min python: max(iterable[, key=func])
min
— returns the minimum, or least, value from a given iterable. related: lt opposite: max distinct: minute python: min(iterable[, key=func])
product — reduces an iterable collection of numbers to the product of all the values with mul and unit as a basis. values are not necessarily numbers. related: mul, sum ✍
reversed
— returns the reversed form of an iterable. is: stateless distinct: reverse opposite: reversed python: reversed(sequence)
stream — a source or target for an ordered progression of values, usually characters in text by way of read and write. input streams are iterable. is: iteration ✍
sum
— reduces an iterable collection of numbers to the sum total of all the values with add and zero as a basis. values are not necessarily numbers. related: add, product python: sum(sequence, start=0)
def — to define; to put a local variable in the current scope of a context. aka: value distinct: var ✍
dict
— an unordered linear collection (particularly a set) of items that expresses a relation of keys (domain) to values (range). in systems where dict inherits bag, it overrides the hash and eq attr functions. is: collection, bag attrs: keys, values, items, update, complete related: item, key, value distinct: object perl: hash seuss: a saque of items. python: dict()
©2009 Kris Kowal
Codish Lexicon by Kris Kowal is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.
