Liking cljdoc? Tell your friends :D

infix.core

Main public API for the Infix syntax library.

Main public API for the Infix syntax library.
raw docstring

_+_cljmacro

(_+_ & expr)

Terse alias for infix — operand-operator-operand notation.

Example: (+ a + b * c) => (+ a (* b c)) (+ x => x * x) => (fn [x] (* x x))

Terse alias for `infix` — operand-operator-operand notation.

Example:
  (_+_ a + b * c) => (+ a (* b c))
  (_+_ x => x * x) => (fn [x] (* x x))
sourceraw docstring

infixcljmacro

(infix & expr)

Transform infix expressions into Clojure forms.

Example: (infix a + b * c) => (+ a (* b c)) (infix x => x * x) => (fn [x] (* x x))

Transform infix expressions into Clojure forms.

Example:
  (infix a + b * c) => (+ a (* b c))
  (infix x => x * x) => (fn [x] (* x x))
sourceraw docstring

infix-defncljmacro

(infix-defn fn-name & args)

Define a function with infix expressions in the body.

Example: (infix-defn square [x] x * x) => (defn square [x] (* x x))

Define a function with infix expressions in the body.

Example:
  (infix-defn square [x] x * x)
  => (defn square [x] (* x x))
sourceraw docstring

infix-letcljmacro

(infix-let bindings & body)

Sequential bindings with infix expressions on the right-hand side.

Example: (infix-let [a (1 + 2) b (a * 4)] b + 10) => (let [a (+ 1 2) b (* a 4)] (+ b 10))

Sequential bindings with infix expressions on the right-hand side.

Example:
  (infix-let [a (1 + 2) b (a * 4)] b + 10)
  => (let [a (+ 1 2) b (* a 4)] (+ b 10))
sourceraw docstring

returncljmacro

(return value)

Early return from infix-defn functions.

Example: (infix-defn safe-div [x y] (when y = 0 (return nil)) x / y)

Early return from infix-defn functions.

Example:
  (infix-defn safe-div [x y]
    (when y = 0 (return nil))
    x / y)
sourceraw docstring

throw-returnclj

(throw-return value)

Throw special exception for early returns. Used by the return macro.

Throw special exception for early returns. Used by the return macro.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close