What you will learn in Clojure: The Essential Reference
Chapter by chapter
Concepts explained in this book
- lazy listA lazy sequence is a sequence whose elements are computed incrementally as they are requested.
- reduction operationreduce is a Clojure function that combines collection elements by repeatedly applying a reducing function to an accumulator and the next element.
- destructuring assignmentAssociative destructuring binds values from key-value collections to names according to keys specified in a binding form.
- predicateA predicate is a function whose result is interpreted as a boolean condition, even when its returned value is not literally boolean.
- sequenceA sequential collection is a collection abstraction whose elements can be traversed in a defined sequential order.
- fn?fn? is a Clojure predicate that returns true when its argument is a Clojure function.
- type hintsA type hint is metadata that annotates a Clojure expression or argument with Java type information to guide compilation, method dispatch, or interoperability.
- standard libraryA standard library is the collection of reusable code packaged with a programming language and made available as part of its normal distribution.
- depth-first searchDepth-first traversal is a tree-traversal technique that visits a node and recursively explores its descendants before moving to other branches.
- tail recursionTail recursion is recursion in which the recursive call is the final operation of a computation, allowing control to continue without retaining pending caller work.
- loopA loop is a language construct that repeatedly evaluates a body while passing through successive control states or values.
- metadataMetadata is a map of descriptive key-value properties attached to Clojure forms or values.
- chunked lazy sequenceA chunked lazy sequence is a lazy sequence that realizes and processes elements in contiguous chunks rather than individually.
- Clojure varA Clojure var is a named mutable reference that stores a root binding and associated metadata within a namespace.
- sequenceable collectionSeqable is the Clojure interface implemented by values that can provide a sequence view of their elements.
- comparison functionThe Java Comparator interface defines an object contract for comparing two values through a compare method.
- persistent vectorA persistent vector is an immutable vector implementation that preserves older versions through structural sharing.
- dynamic bindingA dynamic variable is a Clojure var whose binding can be temporarily changed for a dynamic execution context, including a thread.
- ClojureA hosted functional programming language that runs primarily on the Java Virtual Machine and emphasizes immutable data and persistent data structures.
- interopJava interoperability is Clojure's capability to call Java classes, methods, and libraries from Clojure code.
- loop-recurrecur is a Clojure special form that transfers control to the innermost enclosing loop or function form using replacement arguments.
- hash array mapped trieA hash array mapped trie is a shallow bit-mapped tree structure that supports associative operations by partitioning hash bits across trie levels.
- recordA database row is one record in a relational table, containing a value for each applicable column.
- side effectA side effect is an observable interaction or state change produced by evaluating a computation in addition to returning a value.
- numerical overflowInteger overflow is the condition in which an integer computation exceeds the representable range and wraps or otherwise produces a bounded-width result.
- ahead-of-time compilationAhead-of-time compilation is compilation performed before program execution to produce an executable or loadable representation.
- conjconj is a Clojure function that adds one or more items to a collection according to the collection's type-specific conjoining semantics.
- reifyreify is a Clojure special form that creates an object implementing Java interfaces or extending a Java class with inline method implementations.
- defmacrodefmacro is a Clojure special form or macro-definition facility that defines a macro and binds it to a var in the current namespace.
- transducerA transducer composition is a combined transducer formed by composing multiple transducers into one transformation.
- secondfnext is a Clojure function that returns the second element of a sequence or nil when it is unavailable.
- transducetransduce is a Clojure function that applies a transducer and reducing function to a collection to produce a result.
- lazy-seq macrolazy-seq is a Clojure macro that constructs a sequence whose body is evaluated and cached on demand.
- syntax-quoteSyntax-quote is Clojure reader syntax that quotes an expression while supporting symbol qualification, gensym generation, unquoting, and unquote-splicing.
- namespaceA namespace is a Clojure scope that organizes and qualifies names such as functions and variables.
- definlinedefinline is a Clojure macro that defines a function eligible for compiler inlining, including for Java interoperability.
- reflectionJava reflection is an API mechanism for discovering class structure and invoking constructors or other members at runtime.
- threading macroA thread-first macro rewrites a sequence of calls by inserting the threaded value as the first argument of each call.
- identical?identical? is a Clojure function that tests whether two objects occupy the same identity or memory address under Java object semantics.
- arityAn arity is a function signature defined by the number of arguments it accepts.
- inliningInlining is a compilation technique that substitutes an alternative implementation for a var invocation instead of using its root or thread binding.
- mapmap is a Clojure function that applies a function to corresponding elements of one or more collections and returns a lazy sequence of results.
- macroexpandmacroexpand is a Clojure function that expands a macro invocation into the form it produces before evaluation.
- associative containerAn associative data structure is a collection that supports lookup of values by keys or numeric indexes.
- macro hygieneMacro hygiene is the practice of preventing names introduced by macro expansion from unintentionally colliding with names in the surrounding code.
- catcat is a Clojure transducer that removes one layer of sequential wrapping by feeding the elements of each inner sequential result into a reducing function.
- distinct keyworddistinct is a Clojure function or transducer that removes repeated items from a collection while preserving the first occurrence of each item.
- cachingA cache is a storage structure that retains previously computed results for retrieval by associated keys or repeated access.
- higher-order functionA higher-order function is a function that can be treated as a value by being stored, passed as an argument, or returned.
- unchecked-decunchecked-dec-int is a Clojure function that decrements using Java Integer arithmetic without implicit promotion to Long or overflow checking.
- comparecompare is a Clojure function that returns a negative, zero, or positive integer indicating the relative order of two comparable values.
- text chunkSequence chunking is an internal optimization that computes a group of sequence elements ahead of their individual demand.
- clojure.zipclojure.zip is the Clojure namespace that implements zipper data structures for navigating and functionally editing tree-shaped data.
- vectorA vector is an ordered, indexed Clojure collection that stores values as sequential elements.
- partition-allpartition-all is a Clojure function that divides a collection into subsequences of up to a requested size, retaining a final smaller subsequence when necessary.
- defndefn is a Clojure macro that defines a named function and interns it in the enclosing namespace.
- clojure.java.ioclojure.java.io is a Clojure namespace that provides polymorphic utilities for interacting with Java input/output resources, files, URLs, and classpath resources.
- syntax-unquoteUnquote is syntax inside a syntax-quote expression that evaluates an embedded expression and inserts its result.
- unquote-splicingUnquote-splicing is syntax inside a syntax-quote expression that evaluates a collection and inserts its elements into an enclosing collection.
- libraryA Clojure library is a source file whose name corresponds to the namespace declaration it contains and which follows conventions for storing and reusing Clojure code.
- letfnletfn is a Clojure macro that binds locally scoped named functions whose names are mutually visible within the binding form.
- listA list is a Clojure sequential collection whose elements are traversed in order and which is optimized for access at the ends.
- unchecked-add-intunchecked-add-int is a Clojure function that adds two numeric values as primitive 32-bit signed integers without overflow checking.
- docstringA docstring is a string associated with a function definition that describes the function for users and tools.
- multiple arityMultiple arity is a function feature that provides distinct parameter lists and bodies for different argument counts.
- preconditionA precondition is a Boolean assertion that must hold before a function body executes.
- compileclojure.lang.Compile is the Clojure Java class whose main method performs ahead-of-time compilation from the command line.
- contains.contains is a Java Collection or String method that tests whether a collection contains an element or a string contains a substring.
- get methodget is a Clojure function that retrieves a value associated with a key or index from a collection and returns nil or a supplied fallback when lookup is unavailable.
- clojure.replclojure.repl is the Clojure namespace containing utilities for documentation lookup, source inspection, namespace browsing, and exception reporting in the REPL.
- infinite data structureAn infinite sequence is a sequence with unboundedly many elements, typically generated on demand.
- some->some-> is a Clojure macro that threads a value through forms as the second argument of each successive call and stops with nil when an intermediate result is nil.
- accumulatorAn accumulator is the value representing the result of a reduction after processing some prefix of the input.
- reducing functionA reducing function is a function that combines an accumulator with the next element of a collection during a reduction.
- reductionsreductions is a Clojure function that returns the intermediate accumulator results produced by a reduction.
- CollFold protocolCollFold is a Clojure protocol that allows a collection to provide its own partitioned folding implementation.
- unchecked-multiplyunchecked-multiply-int is a Clojure function that multiplies two numeric values as primitive 32-bit signed integers without overflow checking.
- nthrestnthrest is a Clojure function that removes a specified number of elements from the beginning of a sequence and returns an empty list when the sequence is exhausted.
- unchecked operatorsAn unchecked-int operator is a Clojure arithmetic function that casts numeric arguments to primitive int values and returns a primitive int result without overflow checks.
- compatibility groupA compatibility group is a category of Clojure types whose values can be compared by common equivalence rules.
- every-predevery-pred is a Clojure function that returns a predicate combining multiple predicates with conjunction across its arguments.
- accessor methodGetter and setter methods are methods that respectively read and modify an object's exposed property values.
- reduced?reduced? is a Clojure predicate that tests whether a value is a Reduced object.
- transient data structureA transient map is a temporary mutable map representation that supports efficient batched updates before conversion to a persistent collection.
- struct-mapstruct-map is a Clojure function that creates a struct instance from a struct definition and key-value pairs.
- Comparable interfaceThe Java Comparable interface defines a natural ordering for instances of a class through its compareTo method.
- short-circuit evaluationShort-circuit evaluation is an evaluation strategy that skips operands whose results cannot affect the overall logical result.
- hashhash is Clojure's default hashing function, mapping any object, including nil, to a 32-bit signed integer consistent with Clojure hashing rules for supported values.
- ConcurrentHashMapjava.util.concurrent.ConcurrentHashMap is a Java hash table supporting concurrent access and updates by multiple threads.
- work stealingWork-stealing is a parallel scheduling technique in which an idle worker takes unprocessed tasks from another worker's queue.
- linear memory complexityLinear memory complexity is an asymptotic space requirement that grows proportionally with input size.
- nanNaN is a floating-point value representing an undefined or unrepresentable numeric result and having special comparison behavior.
- not=not= is a Clojure comparison function that returns the logical negation of = for its arguments.
- clojure.testclojure.test is Clojure's standard unit-testing framework namespace.
- *stack**stack* is an internal dynamic variable in the clojure.xml namespace.
- structA Clojure struct is a map-like data structure with a defined set of keys and structural constraints.
- map as functionMap-as-function is Clojure's behavior in which a map can be placed in callable position to look up a key and optionally accept a default value.
- refA ref is a Clojure reference type whose coordinated state changes occur within software transactional memory transactions.
- zip/nextzip/next is a Clojure zipper API function that advances a location along a depth-first traversal.
- zipperA zipper is a data structure that represents a focused location in a recursively nested structure together with the context needed to navigate and update it.
- zipper navigation functionA zipper navigation function is a Clojure zipper API function that changes the focused location in a specified tree direction.
- zipper nodenode is a Clojure zipper API function that retrieves the data at the current zipper location.
- zipper update functionA zipper update function functionally changes the node or structure represented at a zipper location.
- map-indexedmap-indexed is a Clojure function that applies a function to each collection element together with its index and returns the results as a lazy sequence or transducer output.
- missing valuenil is Clojure's null value, representing the absence of a value or a null reference.
- first elementfirst is a Clojure function that returns the first element of a sequenceable collection or nil when none is available.
- literalA compile-time literal is a fixed Clojure value recognized by the compiler without evaluating an expression to obtain it.
- case statementA switch statement is a control-flow construct that selects an execution branch by matching a value against alternative cases.
- eductioneduction is a Clojure function that applies one or more transducers lazily to a collection and returns a non-caching sequential view of the transformed results.
- collectionA Java collection is an object from Java's collection abstractions that stores or organizes multiple values.
- findfind is a Clojure function that searches an associative collection for a key and returns the corresponding key-value entry or nil.
- interningInterning is a caching technique that reuses a single object instance for equivalent values, such as selected literals.
- symbolA Clojure symbol is a symbolic identifier that can name a var, local binding, or function parameter, appear as code data, carry metadata, and optionally include a namespace qualification.
- conditional logicConditional branching is a control-flow technique that selects which expressions to evaluate according to a condition.
- parallel mappmap is a Clojure function that applies a function to one or more collections in parallel and returns a lazy sequence of results in input order.
- bit operationA bitwise operator performs a logical or shifting operation directly on the binary representation of an integer.
- hierarchyA nested data structure is a data structure containing other data structures as elements or values at multiple levels.
- unchecked-addunchecked-add is a Clojure numeric function that performs addition without overflow checking or automatic promotion.
- unchecked-remainder-intunchecked-remainder-int is a Clojure function that computes the remainder of two numeric values as primitive 32-bit signed integers without overflow checking.
- persistent data structureA persistent data structure is an immutable collection that preserves prior versions when updated, typically through structural sharing.
- Order propertyA relation that determines the relative ordering of values, such as less than, greater than, or equality.
- identityObject identity is the property of an object being the specific allocated instance referenced by a value rather than merely an object with equal contents.
- derefderef is a Clojure function that retrieves the current or available value from a dereferenceable object, optionally with a timeout and default value.
- mutual recursionMutual recursion is a recursive computation in which two or more functions call one another.
- for formfor is a Clojure macro that generates a lazy sequence by combining collection bindings, optional filtering clauses, and a result body.
- pcallspcalls is a Clojure function that invokes zero-argument functions in parallel and returns their results as a lazy sequence.
- pvaluespvalues is a Clojure macro that evaluates multiple expressions in parallel and returns their results as a lazy sequence.
- unchecked-inc-intunchecked-inc-int is a Clojure function that increments using Java Integer arithmetic without implicit promotion to Long or overflow checking.
- folderA Clojure folder is a collection-enhancing function that supplies custom reducing and folding implementations through a transforming function.
- dropdrop is a Clojure function that removes a specified number of elements from the beginning of a sequence or returns a transducer that performs that removal.
- drop_whiledrop-while is a Clojure function that removes the longest prefix of a sequence whose elements satisfy a predicate or returns a transducer that performs that removal.
- taketake is a Clojure function that returns the first specified number of elements from a collection or returns a transducer that keeps that prefix.
- takeWhiletake-while is a Clojure function that returns the longest prefix of a sequence whose elements satisfy a predicate or returns a transducer that keeps that prefix.
- defprotocoldefprotocol is a Clojure macro that defines a protocol interface supporting dynamic dispatch independently of Java class inheritance.
- append!r/append! is a Clojure reducer function that adds an element to a mutable Java collection and returns the collection result.
- foldcatr/foldcat is a Clojure reducer function that combines chunk results into a reducible and foldable concatenation structure.
- *agent**agent* is a Clojure dynamic variable bound to the agent whose action function is currently executing.
- atomclojure.lang.Atom is the Clojure runtime class that wraps a Java AtomicReference to implement atom state management.
- gen-classgen-class is a Clojure facility that generates a named Java class from Clojure declarations and implementations.
- clojure.core.serverclojure.core.server is the Clojure namespace implementing server-socket functionality.
- clojure.data/diffclojure.data/diff is a Clojure function that recursively compares two values and returns the parts unique to each value and the parts they share.
- typetype is a Clojure function that returns an object's type, consulting a :type metadata tag before determining the underlying class.
- let formlet* is the Clojure special form that parses and validates the sequential bindings used internally by let.
- hash-sethash-set is a Clojure function that creates an unsorted set from zero or more values, retaining only one value for each equality class.
- dotimesdotimes is a Clojure macro that evaluates a body a specified number of times while binding an incrementing integer and returns nil.
- ArithmeticExceptionArithmeticException is a Java runtime exception thrown for invalid arithmetic operations, such as integer division by zero.
- persistent listclojure.lang.PersistentList is Clojure's immutable persistent singly linked-list implementation.
- vector functionThe Clojure function vector constructs a vector whose elements are its arguments in argument order.
- vector tailA vector tail is the separately stored final portion of a persistent vector.
- ordered setsorted-set is a Clojure function that creates a set whose elements are maintained according to a comparator-defined ordering.
- keywordA Clojure keyword is a named immutable value that can identify map keys and can itself perform associative lookup when invoked.
- partition-bypartition-by is a Clojure function that partitions a sequence whenever successive results of a function differ.
- alteralter is a Clojure function that updates a ref inside a transaction by applying a function to its old value.
- commutecommute is a Clojure function that records a ref update as order-independent when the update operations commute.
- dosyncdosync is a Clojure macro that executes forms within a software transactional memory transaction without options.
- ensureensure is a Clojure function that validates a ref's value remains unchanged during the current transaction.
- io!io! is a Clojure macro that marks code as unsuitable for execution inside a transaction by throwing an exception there.
- read faultA read fault is a transactional memory condition in which a transaction cannot safely use the value it read and must respond according to the ref's history policy.
- write skewWrite skew is a concurrency anomaly in which transactions independently update different shared references while jointly violating a constraint.
- pretty printingPretty printing is the generation of human-readable textual representations with structured layout and spacing.
- lastlast is a Clojure function that returns the final element of a sequenceable collection or nil when none is available.
- dedupededupe is a Clojure function that removes consecutive duplicate values while retaining separated repetitions.
- create-structcreate-struct is a Clojure function that creates an anonymous struct definition from a set of keys.
- defstructdefstruct is a Clojure macro that establishes a var containing a struct definition.
- struct constructorA struct constructor is a Clojure function that creates a struct instance by matching supplied values positionally to a struct definition's keys.
- struct instanceA struct instance is a map-like value created from a struct definition and containing its defined keys, possibly with nil values.
- dirdir-fn is a Clojure function that returns the public definitions declared in a namespace as a sequence.
- arbitrary-precision integerBigInt is Clojure's arbitrary-precision integer representation, optimized to use primitive numeric values when possible.
- compiler optionThe compiler-options dynamic variable is a Clojure configuration map that controls selected compiler behaviors.
- direct linkingDirect linking is a Clojure compilation mode that inlines var contents into compiled code instead of resolving them through var indirection.
- character encodingA character encoding is a scheme that maps characters to byte sequences and decodes byte sequences into characters.
- clojure.java.io/as-urlclojure.java.io/as-url is a Clojure function that converts supported location representations into URL objects.
- clojure.java.io/copyclojure.java.io/copy is a Clojure function that copies data between supported combinations of streams, readers, writers, strings, and files.
- clojure.java.io/fileclojure.java.io/file is a Clojure function that constructs a java.io.File representation from supported path components and locations.
- clojure.java.io/readerclojure.java.io/reader is a polymorphic Clojure function that creates a character reader from supported resource, stream, file, URL, socket, array, or string inputs.
- clojure.java.io/resourceclojure.java.io/resource is a Clojure function that retrieves a URL for a resource located on the Java classpath.
- clojure.java.io/writerclojure.java.io/writer is a polymorphic Clojure function that creates a character writer from supported resource, stream, file, URL, socket, array, or string inputs.
- transformation pipelineA transformation pipeline is a sequence of operations in which each operation passes its result to the next operation.
- some-fnsome-fn is a Clojure function that returns a function combining multiple predicates and returning the first truthy predicate result.
- zipmapzipmap is a Clojure function that creates a map by pairing corresponding elements from a collection of keys and a collection of values.
- constant timeConstant time is an asymptotic complexity in which execution time does not grow with input size.
- if-letif-let is a Clojure special form that conditionally establishes local bindings and evaluates a body when its binding expression succeeds.
- precisionNumeric precision is the amount of numerical detail a representation or calculation can retain.
- protocolA Clojure protocol is a named set of method signatures that types can implement and that is represented by a corresponding Java interface.
- associativityAssociativity is the property that the grouping of operands does not affect the result of repeatedly applying a binary operation.
- parallel reducerA parallel reducer is a reducer designed to produce defined results when its work is divided among concurrent fold tasks.
- stateful reducerA stateful reducer is a reducer whose behavior depends on information propagated between invocations of its reducing function.
- transforming functionA transforming function is a unary function that receives a reducing function and returns a replacement reducing function.
- linear searchA linear search examines collection elements sequentially until a matching element is found or the collection is exhausted.
- entry pointA main method is a Java entry-point method that Java launchers invoke to start an application.
- r/catr/cat is the concatenation function in clojure.core.reducers that combines counted values into a reducible and foldable tree or creates an empty mutable collection.
- integerThe int type is a fixed-width signed integer type representing whole-number values in the Java numeric type system.
- namespace mapping tableA namespace mapping is the association between names and vars maintained within a Clojure namespace.
- hash collisionA hash collision occurs when distinct keys produce the same hash-table index or hash value.
- edit distanceLevenshtein distance is a metric counting the minimum single-character insertions, deletions, or substitutions needed to transform one string into another.
- memoizationMemoization is a caching technique that stores the results of function evaluations keyed by their inputs.
- filter+filter+ is a book-defined filtering function that applies a multi-argument predicate to corresponding elements of multiple collections.
- unchecked-mathunchecked-math is a Clojure dynamic variable that enables compiler optimizations using unchecked arithmetic and primitive JVM operations.
- mapvmapv is a Clojure function that applies a mapping function to a collection and returns the results in a vector.
- rand-intrand-int is a Clojure function that returns a pseudorandom integer from zero up to, but not including, a specified integer bound.
- poppop is a Clojure function that returns a collection with its end element removed according to the collection's pop semantics.
- butlastbutlast is a Clojure function that returns a sequence containing all but the last element of a collection.
- ffirstffirst is a Clojure function that returns the first element of the first nested sequence or nil when it is unavailable.
- nextnext is a Clojure function that returns a sequence containing all but the first element of a collection, returning nil when no elements remain.
- nfirstnfirst is a Clojure function that returns the sequence obtained after removing the first element of the first nested sequence, or nil when unavailable.
- nnextnnext is a Clojure function that returns the sequence obtained after removing the first two elements, or nil when no such sequence exists.
- restrest is a Clojure function that returns a sequence containing all but the first element of a collection, returning an empty sequence when no elements remain.
- clojure.stringclojure.string is the Clojure standard-library namespace providing additional string-processing functions.
- iterator-seqiterator-seq is a Clojure function that creates a sequence by traversing a java.util.Iterator.
- completingcompleting is a Clojure function that adapts a binary reducing function with completion behavior for use as a transducer reducing function.
- cond->cond-> is a Clojure macro that conditionally threads an expression into the first argument position of successive forms.
- unchecked-incunchecked-inc is a Clojure function that increments a numeric value without checking for numeric overflow.
- psortpsort is a book-specific sorting function that processes externally stored chunks in parallel and lazily exposes their merged ordering.
- merge sortMerge sort is a comparison-sorting algorithm that recursively divides input into smaller portions and merges ordered portions back together.
- O(n * log n)O(n log n) complexity is an asymptotic growth rate in which computation increases proportionally to input size times its logarithm.
- sort-bysort-by is a Clojure function that orders collection elements according to comparator results computed from a key function.
- sorting algorithmThe arrangement of elements into an order determined by a comparison criterion.
- TimSortTimsort is a hybrid stable sorting algorithm that exploits existing ordered runs and combines insertion sorting with merging.
- clojure.xmlclojure.xml is the Clojure namespace providing XML parsing and related XML input and output functionality.
- A-star algorithmA* is a graph-search algorithm that selects paths using the sum of accumulated path cost and a heuristic estimate of remaining cost.
- sorted-map-bysorted-map-by is a Clojure constructor function that creates a persistent map whose keys are ordered by a supplied comparator.
- drop-lastdrop-last is a Clojure function that returns a sequence with a specified number of elements removed from its end.
- nthnextnthnext is a Clojure function that returns the sequence after a specified number of elements, or nil when that many elements are unavailable.
- take-lasttake-last is a Clojure function that returns the specified number of elements from the end of a sequence.
- polymorphic dispatchA dispatch function is a callable operation that selects and invokes an implementation based on an argument's dispatch value.
- bit-andbit-and is a Clojure function that applies bitwise conjunction to two or more integer arguments.
- bit maskA bit mask is a bit pattern whose positions selectively test, set, clear, or flip corresponding bits in another pattern.
- bit-orbit-or is a Clojure function that applies bitwise disjunction to two or more integer arguments.
- type compatibilityType compatibility is the property that two values belong to categories that an operation can compare according to its compatibility rules.
- root bindingA root binding is the optional value associated with a Clojure var that is visible from all threads.
- floating-point arithmeticFloating-point arithmetic is numerical computation using finite-precision representations with a significand and exponent.
- aproposapropos is a Clojure REPL function that searches public definitions by matching text in their names.
- demungedemunge is a Clojure function that translates munged Java-style names back into readable Clojure names.
- find-docfind-doc is a Clojure REPL function that searches available documentation strings using a regular-expression pattern.
- mungemunge is a Clojure function that translates valid Clojure names into names valid for Java classes and packages.
- pstpst is a Clojure REPL function that prints a selected portion of an exception's stack trace, including nested causes when present.
- root-causeroot-cause is a Clojure function that returns the innermost underlying exception in a chain of wrapped exceptions.
- sourcesource is a Clojure macro that prints the original source text for a public definition.
- source-fnsource-fn is a Clojure function that returns the original source text for a public definition as a string.
- sequeseque is a Clojure function that presents a producer sequence through an asynchronously filled in-memory queue.
- clojure.java.shellclojure.java.shell is the Clojure namespace that provides functions for executing operating-system commands as separate processes.
- clojure.pprint/simple-dispatchsimple-dispatch is the default Clojure pretty-print dispatch multimethod for selecting formatters based on object types.
- partitionpartition is a Clojure function that divides a collection into subsequences according to a requested size, step, and optional padding.
- interleave-xforminterleave-xform is a custom transducer that expresses interleaving as a single-input transducer transformation.
- re-seqre-seq is a Clojure function that returns a lazy sequence of matches for a regular expression in a string.
- quote formquote is a Lisp special form that prevents an expression from being evaluated and returns it as data.
- clojure.coreclojure.core is the Clojure namespace containing the language's principal public functions, macros, operators, and conditionals.
- if-someif-some is a Clojure macro that lexically binds a single value and evaluates one of two forms according to whether that value is non-nil.
- when-letwhen-let is a Clojure macro that lexically binds a single value and evaluates a body of forms only when that value is truthy.
- when-somewhen-some is a Clojure macro that lexically binds a single value and evaluates a body of forms only when that value is non-nil.
- assoc-inassoc-in is a Clojure function that returns an associative collection with an association added or replaced at a nested key path.
- dissoc-indissoc-in is a function that removes a value at a path of keys from a nested associative data structure.
- dissocdissoc is a Clojure function that returns an associative collection with specified key-value associations removed.
- Clojure proxyproxy is a Clojure facility that generates a Java class extending a concrete class or implementing interfaces and returns instances with method overrides.
- EDNEDN is an extensible data notation format for encoding Clojure data as text.
- logical AND operatorLogical conjunction is an operation that is true only when all of its operands are true.
- asynchronous bufferAn asynchronous buffer is a storage structure filled or drained by computation running independently of its consumer or producer.
- backpressureBack-pressure is flow control in which a downstream capacity limit slows or pauses upstream production.
- gen-interfacegen-interface is a Clojure macro that generates a Java interface from a name, parent interfaces, and method signatures.
- nearest smaller value searchNearest smaller value search is an algorithmic technique that finds, for each input element, the closest preceding element with a smaller value.
- gensymgensym is a Clojure function that generates a unique symbol, typically for avoiding name collisions in macro-generated code.
- mapcat*mapcat* is a book-specific alternative function that performs mapcat-style transformation while avoiding its initial eager argument evaluation.
- chunkchunk is a Clojure function that converts a ChunkBuffer into an immutable chunk implementing IChunk.
- chunk-appendchunk-append is a Clojure function that adds an element to a ChunkBuffer while space remains.
- chunk-bufferChunkBuffer is a mutable Clojure runtime buffer backed by a Java object array for assembling a chunk.
- chunk-conschunk-cons is a Clojure function that constructs a chunked sequence by adding a chunk to a sequential remainder.
- chunk-firstchunk-first is a Clojure function that returns the first chunk of a chunked sequence.
- chunk-nextchunk-next is a Clojure function that returns the remainder of a chunked sequence after removing its first chunk, or nil when none remains.
- chunk-restchunk-rest is a Clojure function that returns the remainder of a chunked sequence after removing its first chunk, or an empty list when none remains.
- alias tableAn alias table is a namespace-associated mapping from aliases to the namespaces they designate.
- destructuredestructure is a Clojure function that transforms a binding form and an expression into bindings implementing destructuring.
- two's complementTwo's complement is a binary representation of signed integers in which negative values are encoded by complementing the bits of their magnitudes and adding one.
- awaitawait is a Clojure function that blocks until one or more agents have completed their currently queued actions.
- restart-agentrestart-agent is a Clojure function that clears an agent's error condition and resumes processing, optionally discarding pending actions.
- sendsend is a Clojure function that asynchronously dispatches an action function to an agent for execution on the fixed-size agent send pool.
- send-offsend-off is a Clojure function that asynchronously dispatches an action function to an agent for execution on the unbounded agent send-off pool.
- send-viasend-via is a Clojure function that asynchronously dispatches an agent action using a specified executor.
- thread poolA thread pool is a set of reusable worker threads managed to execute multiple tasks without creating a new thread for each task.
- unbounded poolAn unbounded thread pool is an executor configuration that can create workers without a fixed upper limit as tasks require them.
- inheritanceConcrete inheritance is an object-oriented mechanism in which a concrete class inherits implementation from another concrete class.
- *compile-files**compile-files* is a Clojure dynamic variable indicating whether compilation should generate class files.
- applyA Lisp-family function that invokes a function with arguments supplied as a sequence or combined with explicitly supplied arguments.
- longA Java long is a signed 64-bit primitive integer type with a fixed representable range.
- unchecked-divide-intunchecked-divide-int is a Clojure function that divides one numeric value by another as primitive 32-bit signed integers without overflow checking.
- unchecked-negate-intunchecked-negate-int is a Clojure function that negates a numeric value as a primitive 32-bit signed integer without overflow checking.
- unchecked-subtract-intunchecked-subtract-int is a Clojure function that subtracts one numeric value from another as primitive 32-bit signed integers without overflow checking.
- read-execute-print loopA REPL is an interactive programming environment that repeatedly reads input, evaluates it, and prints the result.
- future?future? is a Clojure predicate that reports whether a value is a future reference.
- postwalkpostwalk is a Clojure function that recursively traverses a nested data structure and applies a function to each node after its children have been processed.
- prewalkprewalk is a Clojure function that applies a function to each node of a nested data structure before recursively traversing that node's children.
- binding vectorA binding vector is a vector-form binding specification that associates local names with values or iteration parameters.
- head retentionHead retention is the unintended preservation of references to the beginning of a lazy sequence, which can keep realized elements in memory and prevent garbage collection.
- mutationMutation is the alteration of a value or variable's state after it has been established.
- concatenationconcat is a Clojure function that returns a lazy sequence containing the elements of two or more sequential collections in succession.
- lazy-catlazy-cat is a Clojure macro that lazily concatenates collections without evaluating its arguments in advance.
- pure functionA pure function produces the same result for the same arguments and has no observable side effects.
- set!set! is a Clojure mutation construct that assigns a value to a mutable target such as a field or thread-local binding.
- Bresenham's line algorithmBresenham's line algorithm is a rasterization algorithm that selects discrete pixel positions approximating a straight line between two endpoints.
- clojure.java.javadocclojure.java.javadoc is a Clojure namespace that organizes Javadoc locations and opens Java documentation through a system browser.
- removeremove is a Clojure function that returns a lazy sequence excluding the elements of a collection for which a predicate returns a truthy value.
- intointo is a Clojure function that conjoins the elements of a source collection into a destination collection, optionally applying a transducer.
- take-nthtake-nth is a Clojure function and transducer that selects every nth element from a sequential input.
- nthnth is a Clojure function that returns the element at a numeric index in an indexed or sequential collection, optionally returning a fallback when the index is absent.
- interposeinterpose is a Clojure function that inserts a separator between successive elements of a collection and can also produce a transducer.
- boxingAutoboxing is the implicit conversion of primitive values to object representations and, where applicable, the reverse conversion.
- sentinel valueA sentinel value is a distinguished value whose agreed meaning signals a condition such as termination or absence of further input.
- reader macroA reader macro is syntax that causes the Clojure reader to transform source text into another expression before evaluation.
- referential transparencyReferential transparency is the property that an expression can be replaced by its value without changing program behavior, because the value depends only on the expression's inputs.
- postorder traversalA post-order traversal processes a node's children before processing the parent node.
- preorder traversalA pre-order traversal processes a node before recursively processing its children.
- vector-ofvector-of is a Clojure function that creates a persistent vector constrained to values coercible to a specified primitive type.
- readThe :read function is a clojure.main/repl callback that obtains and parses the next input expression.
- rangerange is a Clojure function that generates a numeric sequence from a start value toward an end value using a specified step.
- ensure-reducedensure-reduced is a Clojure function that returns a value as a Reduced object without wrapping it again when it is already reduced.
- unreducedunreduced is a Clojure function that returns the underlying value of a Reduced object or the input value when it is not reduced.
- filtervfilterv is a Clojure function that eagerly filters a seqable collection and returns the retained elements as a persistent vector.
- mergemerge is a Clojure function that combines maps by copying key-value pairs and letting later values replace earlier values for conflicting keys.
- merge-withmerge-with is a Clojure function that combines maps while applying a supplied function to values associated with conflicting keys.
- conscons is a Clojure function that constructs a sequence by adding an element to the front of an existing sequence.
- allevery? is a Clojure function that tests whether a predicate returns truthy for every element of a collection.
- not-any?not-any? is a Clojure function that returns the logical negation of some for a predicate and collection.
- not-every?not-every? is a Clojure function that returns the logical negation of every? for a predicate and collection.
- condpcondp is a Clojure macro that evaluates clauses in order using one predicate applied to a selector and an expression, returning the result of the first matching clause or a default.
- stateful transducerA stateful transducer is a transducer that retains partial processing state until it receives a signal that reduction is complete.
- curryingCurrying is the transformation of a function of multiple arguments into a chain of functions that each accept a single argument.
- partialpartial is a Clojure function that returns a function with specified leading arguments pre-applied to a target function.
- partial applicationPartial application is the technique of fixing some arguments of a function to produce another function that accepts the remaining arguments.
- definterfacedefinterface is a Clojure macro that declares a Java interface without providing protocol dispatch semantics.
- deftypedeftype is a Clojure construct that declares a concrete type and generates a corresponding Java class with fields and method implementations.
- *print-base**print-base* is a Clojure dynamic variable specifying the numeric base used when numbers are printed.
- *print-length**print-length* is a Clojure dynamic variable specifying the maximum number of collection items to print.
- *print-level**print-level* is a Clojure dynamic variable specifying the maximum nesting depth to print.
- *print-meta**print-meta* is a Clojure dynamic variable controlling whether metadata is included in readable printed representations.
- *print-miser-width**print-miser-width* is a Clojure dynamic variable specifying the width at which pretty printing may enter miser mode.
- *print-pprint-dispatch**print-pprint-dispatch* is a Clojure dynamic variable holding the multimethod that selects pretty-printing strategies.
- *print-pretty**print-pretty* is a Clojure dynamic variable that enables or disables pretty-print formatting.
- *print-radix**print-radix* is a Clojure dynamic variable controlling whether radix prefixes are printed for non-decimal numeric bases.
- *print-readably**print-readably* is a Clojure dynamic variable controlling whether printed representations preserve readable syntax and escape or decorate values accordingly.
- *print-right-margin**print-right-margin* is a Clojure dynamic variable specifying the preferred maximum number of columns for a pretty-printed line.
- *print-suppress-namespaces**print-suppress-namespaces* is a Clojure dynamic variable controlling whether namespace qualifications are omitted when symbols are printed.
- iterateiterate is a Clojure function that returns an infinite lazy sequence formed by repeatedly applying a unary function to the preceding result.
- vecvec is a Clojure function that creates a vector from a seqable collection, iterable collection, Java array, or nil.
- random-samplerandom-sample is a Clojure function that returns a sequence in which each input element is included independently according to a supplied probability.
- areare is a clojure.test macro that evaluates a family of similar assertions by substituting multiple argument values.
- assert-exprassert-expr is a clojure.test multimethod that dispatches assertion-expression implementations.
- assertion languageAn assertion language is a set of constructs for expressing expected conditions and reporting whether test results satisfy them.
- deftestdeftest is a clojure.test macro that defines a named test function and registers it for test execution.
- isis is a clojure.test macro that evaluates an assertion expression and reports a structured test result.
- run-testsrun-tests is a clojure.test function that runs tests in one or more namespaces and prints a summary.
- test fixtureA test fixture is setup and teardown code that establishes and cleans up the context required by a test.
- test-nstest-ns is a clojure.test function that runs tests in a namespace and honors its test hook when present.
- test-vartest-var is a clojure.test function that executes the test function recorded in a var's metadata.
- use-fixturesuse-fixtures is a clojure.test function that registers fixtures for execution around tests in a namespace.
- clojure.inspectorclojure.inspector is a Clojure namespace providing a user interface for navigating and visualizing data structures.
- cl-formatA Clojure pretty-printing function that formats text and values according to Common Lisp-style format directives.
- self-balancing binary search treeA self-balancing tree is a search tree that maintains bounded height through structural adjustments as elements are inserted or removed.
- repeatedlyrepeatedly is a Clojure function that produces a lazy sequence by invoking a zero-argument function repeatedly, either a specified number of times or indefinitely.
- MonoidAn algebraic monoid is a set equipped with an associative binary operation and an identity element.
- comparison predicateA predicate that evaluates an ordering relationship among one or more values and returns a Boolean result.
- greater-than operatorThe Clojure numeric comparison operator that returns true when its arguments are strictly decreasing from left to right.
- greater-than-or-equal operatorThe Clojure numeric comparison operator that returns true when its arguments are monotonically decreasing from left to right, allowing equality.
- less-than operatorThe Clojure numeric comparison operator that returns true when its arguments are strictly increasing from left to right.
- less-than-or-equal operatorThe Clojure numeric comparison operator that returns true when its arguments are monotonically increasing from left to right, allowing equality.
- rsubseqrsubseq is a Clojure function that returns a sequence of elements within specified bounds from a sorted collection in reverse order.
- subseqsubseq is a Clojure function that returns a sequence of elements within specified bounds from a sorted collection.
- instance?instance? is a Clojure predicate that tests whether an object is an instance of a specified Java class or interface according to Java inheritance rules.
- shuffleshuffle is a Clojure function that returns a vector containing a random permutation of the elements in a supported collection.
- recursionRecursion is a computation technique in which a function invokes itself, directly or through other functions, on a successive subproblem or state.
- macro expansionMacro expansion is the compile-time transformation of a macro invocation into the expression that will be evaluated.
- linear congruential generatorA linear congruential generator is a pseudorandom number algorithm that repeatedly applies a linear recurrence involving multiplication, addition or seeding, and modular reduction.
- pseudo-random number generatorA pseudorandom number generator is a deterministic algorithm that produces number sequences with statistical properties resembling random sequences.
- randrand is a Clojure function that returns a pseudorandom floating-point number generated using the Java runtime's random-number facilities.
- cyclecycle is a Clojure function that repeatedly traverses input items in order to produce an unbounded lazy sequence.
- repeatrepeat is a Clojure function that produces a lazy sequence containing repeated copies of a value, either indefinitely or a specified number of times.
- closureA closure is a function that retains references to bindings from its defining lexical environment.
- locals clearingLocals clearing is a compiler optimization that nulls references held by a function after one-time execution so the referenced resources can be reclaimed.
- mpz_modmod is a Clojure function that returns the modulus of two numbers, with sign behavior determined by the divisor.
- quotquot is a Clojure function that returns the quotient of dividing two numbers, truncating any fractional part.
- remrem is a Clojure function that returns the remainder of dividing two numbers, with sign behavior determined by the dividend.
- number roundingNumeric rounding is the approximation of a value to the finite precision available in its numerical representation.
- read-stringread-string is a Clojure function that parses a string as a Clojure expression and returns its data-structure representation.
- MapA map is an associative Clojure collection that stores values under keys.
- decdec is a Clojure function that decrements a numeric value by one.
- bindingwith-bindings is a Clojure macro or function that establishes thread-local bindings from explicit var objects and values.
- avalanche effectThe avalanche effect is a hashing property in which a small input change alters at least about half of the output bits.
- hash-ordered-collhash-ordered-coll is a Clojure function that computes a hash for an iterable collection while preserving the significance of element order.
- hash-unordered-collhash-unordered-coll is a Clojure function that computes a collection hash independent of the order of its elements.
- sorted-set-bysorted-set-by is a Clojure constructor function that creates a sorted set using a supplied comparator.
- polymorphismPolymorphism is a programming technique in which one operation can select different implementations according to its inputs or dispatch criteria.
- classA Java class is a JVM type definition that specifies the state and behavior of objects and may implement interfaces or extend another class.
- disjdisj is a Clojure function that returns a set with one or more specified elements removed.
- reduce-kvreduce-kv is a Clojure function that reduces an associative data structure by applying a three-argument function to an accumulator, key, and value for each entry.
- boolean operationA boolean operator is an operator or function that combines or transforms truth-valued expressions.
- juxtjuxt is a Clojure function that returns a function applying multiple supplied functions to the same arguments and collecting their results in a vector.
- multimethodA multimethod is a Clojure polymorphic function whose implementation is selected by applying a dispatch function to its arguments.
- contagious typeA contagious type is a numeric type whose precedence causes the result of a mixed-type arithmetic operation to be promoted toward that type.
- number typeA numeric type is a type whose values represent numbers with defined precision, range, and arithmetic behavior.
- type promotionType promotion is the conversion of operands or results to a numeric type capable of representing a required level of precision or range.
- unchecked-negateunchecked-negate is a Clojure function that negates a numeric value without checking for numeric overflow.
- unchecked-subtractunchecked-subtract is a Clojure function that subtracts one numeric argument from another without checking for integer overflow.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
