Compojure-api Api Documentation

Version: 2.0.0-alpha28

compojure.api.common

extract-parameters

(extract-parameters c expect-body)

Extract parameters from head of the list. Parameters can be:

  1. a map (if followed by any form) [{:a 1 :b 2} :body] => {:a 1 :b 2}
  2. list of keywords & values [:a 1 :b 2 :body] => {:a 1 :b 2}
  3. else => {}

Returns a tuple with parameters and body without the parameters

fast-map-merge

(fast-map-merge x y)

fifo-memoize

(fifo-memoize f size)

group-with

(group-with pred coll)

Groups a sequence with predicate returning a tuple of sequences.

merge-vector

(merge-vector v)

Merges vector elements, optimized for 1 arity (x10 faster than merge).

plain-map?

(plain-map? x)

checks whether input is a map, but not a record

when-ns

macro

(when-ns ns & body)