Sincerelly, I read a lot of times about this commands and I don't understand what the real objectives. I'm reading pedestal documentation and I saw a lot of this command ->
and ->>
and I read in nubank's github public repository somethings as ^:private
, s/def
, s/defn
and :-
You should go through a Clojure tutorial first to understand meaning of basic constructs and symbols. These resources can help
In short,
->
and ->>
are threading macross/def
depends on what s
refers to - it is commonly use as an alias for clojure.spec.alpha
and s/def
is then used to define a spec: https://clojure.org/guides/spec
clojure.spec.alpha/defn
so in that case it's probably another "schema library"; it would help if you linked the source you are talking about^:private
is a metadata key that marks a symbol as private within a given namespace; see also http://blogish.nomistech.com/two-ways-of-defining-private-functions/