Liking cljdoc? Tell your friends :D

hara.function.base.arg


arg-checkclj

(arg-check f num)
(arg-check f num message)

counts the number of non-varidic argument types

(arg-check (fn [x]) 1) => true

(arg-check (fn [x & xs]) 1) => true

(arg-check (fn [x & xs]) 0) => (throws Exception "Function must accomodate 0 arguments")

counts the number of non-varidic argument types

(arg-check (fn [x]) 1) => true

(arg-check (fn [x & xs]) 1) => true

(arg-check (fn [x & xs]) 0)
=> (throws Exception "Function must accomodate 0 arguments")
raw docstring

arg-countclj

(arg-count f)

counts the number of non-varidic argument types

(arg-count (fn [x])) => [1]

(arg-count (fn [x & xs])) => []

(arg-count (fn ([x]) ([x y]))) => [1 2]

counts the number of non-varidic argument types

(arg-count (fn [x])) => [1]

(arg-count (fn [x & xs])) => []

(arg-count (fn ([x]) ([x y]))) => [1 2]
raw docstring

varg-countclj

(varg-count f)

counts the number of arguments types before variable arguments

(varg-count (fn [x y & xs])) => 2

(varg-count (fn [x])) => nil

counts the number of arguments types before variable arguments

(varg-count (fn [x y & xs])) => 2

(varg-count (fn [x])) => nil
raw docstring

vargs?clj

(vargs? f)

checks that function contain variable arguments

(vargs? (fn [x])) => false

(vargs? (fn [x & xs])) => true

checks that function contain variable arguments

(vargs? (fn [x])) => false

(vargs? (fn [x & xs])) => true
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close