Clojure Programming/Examples/API Examples
Tools
General
Sister projects
In other projects
This page gives example usage for Clojure API function calls. For a more general introduction to Clojure by example please seehttp://en.wikibooks.org/wiki/Clojure_Programming/By_Example
This page provides examples for the following functions.
| Computation | + | - | * | / | inc | dec | min | max | rem | rationalize |
|---|---|---|---|---|---|---|---|---|---|---|
| Comparison | == | < | > | <= | >= | |||||
| Predicates | zero? | pos? | neg? |
This page provides examples for the following functions.
This page provides examples for the following functions.
This page provides examples for the following functions.
This page defines the following functions
This page defines the following functions.
This page provides examples for the following functions.
This page defines the following functions.
This page provides examples for the following functions.
This page provides examples for the following functions.
(ns test.test (:refer-clojure :exclude [+ -])) (defn + [a b] 33) (+ 1 2) ;= 33
(require '[clojure.zip :as zip]) (require ['clojure.contrib.sql :as 'sql])
user=> (defn #^{:test (fn [] (assert (= 4 (myadd 2 2))))} myadd [a b] (+ a b))#'user/myadduser=> (test #'myadd):ok