Liking cljdoc? Tell your friends :D

facets.core


<aliasclj/s

(<alias type)
source

<fclj/s

(<f facet this)

given a facet keyword and something, return the registered or default implementation

given a facet keyword and something,
return the registered or default implementation
sourceraw docstring

<fsclj/s

(<fs t)

get all facets implementations for the given type

get all facets implementations for the given type
sourceraw docstring

aliasesclj/s

source

anyclj/s

source

assert-existing-derivationsclj/s

(assert-existing-derivations impl-map)
source

assert-facetclj/s

(assert-facet name)
source

assert-facet-impl-mapclj/s

(assert-facet-impl-map impl-map)
source

assert-new-facetclj/s

(assert-new-facet name)
source

assert-new-typeclj/s

(assert-new-type name)
source

assert-no-overidesclj/s

(assert-no-overides old-impls new-impls)
source

assert-nskwclj/s

(assert-nskw name)
source

assert-parentsclj/s

(assert-parents parents)
source

assert-typeclj/s

(assert-type name)
source

assert-type-impl-mapclj/s

(assert-type-impl-map impl-map)
source

callclj/s

(call fk arg1 & args)

call facet f on args

call facet f on args
sourceraw docstring

declare-aliasclj/s

(declare-alias type sym)

register a type-alias ex: (declare-alias clojure.lang.PersistentVector ::vec)

register a type-alias
ex:
(declare-alias clojure.lang.PersistentVector ::vec)
sourceraw docstring

declare-aliasesclj/s

(declare-aliases hm)
source

declare-derived-typeclj/s

(declare-derived-type name parents & [constructor impl-map])

same as declare-type but inherit all impls of the given parents, unless overiden via impl-map parameter

same as declare-type but inherit all impls of the given parents,
unless overiden via impl-map parameter
sourceraw docstring

declare-facetclj/s

(declare-facet name & [impl-map])

declare a new facet, just a fancy name for behavior or method ex: (declare-facet ::say-hello {::type1 (fn [x] (println "hello from type 1")) ::type2 (fn [x] (println "hello from type 2")) :default (fn [x] (println "default hello from a type that doesn't implement ::say-hello))})

declare a new facet, just a fancy name for behavior or method
ex:
(declare-facet ::say-hello
  {::type1 (fn [x] (println "hello from type 1"))
   ::type2 (fn [x] (println "hello from type 2"))
   :default (fn [x] (println "default hello from a type that doesn't implement ::say-hello))})
sourceraw docstring

declare-facetsclj/s

(declare-facets m)
source

declare-typeclj/s

(declare-type name & [constructor impl-map])

declare a new datatype, attaching it the given constructor and facets implementations. ex: (declare-type ::foo identity {:say-hello (fn [this] (println "hello from foo"))})

declare a new datatype, attaching it the given constructor
and facets implementations.
ex:
(declare-type ::foo
  identity
  {:say-hello (fn [this] (println "hello from foo"))})
sourceraw docstring

declare-type*clj/s

(declare-type* {:keys [id constructor facets spec gen]})
source

derivationsclj/s

source

derived-impl-mapclj/s

(derived-impl-map parents impl-map)
source

extend-facetclj/s

(extend-facet name impl-map)

assoc new implementations to existing facet

assoc new implementations to existing facet
sourceraw docstring

extend-facetsclj/s

(extend-facets m)
source

extend-typeclj/s

(extend-type name impl-map)

assoc new facets implementation to existing type

assoc new facets implementation to existing type
sourceraw docstring

facetsclj/s

source

known-type?clj/s

(known-type? t)
source

known-typesclj/s

(known-types)
source

preferclj/s

(prefer type & types)

register a type preference, 'type' will be prefered over 'types'

register a type preference,
'type' will be prefered over 'types'
sourceraw docstring

prefsclj/s

source

pstateclj/s

(pstate)
source

reified->implsclj/s

(reified->impls this)
source

reified?clj/s

(reified? this)
source

reifyclj/s

(reify this parents-or-impl-map)
(reify this parents impl-map)

anonymous type, that can inherit from one or several existing types

anonymous type,
that can inherit from one or several existing types
sourceraw docstring

reset-all!clj/s

(reset-all!)
source

tclj/s

(t e)
(t sym e)

artity 2: assign type sym to e arity 1: get the type tag of e

artity 2: assign type sym to e
arity 1: get the type tag of e
sourceraw docstring

t=clj/s

(t= x & xs)

check if all given args are of same type

check if all given args are of same type
sourceraw docstring

t>clj/s

(t> t & args)

generic constructor call. apply the constructor of type t to args

generic constructor call.
apply the constructor of type t to args
sourceraw docstring

t?clj/s

(t? sym e)

check if e is of type sym

check if e is of type sym
sourceraw docstring

throw-alias-errorclj/s

(throw-alias-error matches)
(throw-alias-error matches type)
source

typesclj/s

source

§clj/s

source

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

× close