concept top in category clojure

appears as: top, top
Clojure: The Essential Reference

This is an excerpt from Manning's book Clojure: The Essential Reference.

  • Core support namespaces integrate core with additional functionalities on top of those already present. clojure.string is possibly the best example. Core already contains “str” but any other useful string functionalities have been moved out into the clojure.string namespace. clojure.template contains a few helpers for macro creation. clojure.set is about the "set" data structure. clojure.pprint contains formatters for almost all Clojure data types so they can print in a nice, human-readable form. Finally clojure.stacktrace contains functions to manipulate exceptions and their formatting.
  • Reducers were introduced in Clojure 1.5. Reducers implementation can be found in the clojure.core.reducers namespace (which needs to be required before use). Reducers contain a wrapper layer on top of the Java fork-join framework (a model for parallelism introduced in Java 1.7). Reducers also contain a set of collection processing functions that have the same name as the ones in core: map, filter, reduce to name a few. Compared to the ones in clojure.core, they create a deferred "recipe" for processing that is executed when calling reduce:

    The Joy of Clojure, Second Edition

    This is an excerpt from Manning's book The Joy of Clojure, Second Edition.

    This is nearly identical to how you’d structure a while loop in an imperative language. One significant difference is that the value of x isn’t decremented somewhere in the body of the loop. Instead, a new value is calculated as a parameter to recur, which immediately does two things: rebinds x to the new value and returns control to the top of print-down-from.

    Figure 10.4. Clojure’s four reference types are listed across the top, with their features listed down the left. Atoms are for lone synchronous objects. Agents are for asynchronous actions. Vars are for thread-local storage. Refs are for synchronously coordinating multiple objects.

    These simple GUI elements are built on top of the Java Swing library, where each sub-widget in the components argument is added to the properly configured Container-derived parent. These are good as a starting point, but there’s nothing to display unless you dive into the Swing API directly. You can do one better than that by providing a simple base set of widgets: buttons, labels, and text boxes.