Liking cljdoc? Tell your friends :D

noahtheduke.splint.rules.lint.redundant-call


redundant-callclj

A number of core functions take any number of arguments and return the arg if given only one. These calls are effectively no-ops, redundant, so they should be avoided.

Current list of clojure.core functions this linter checks:

  • ->, ->>
  • cond->, cond->>
  • some->, some->>
  • comp, partial, merge

Examples:

; bad (-> x) (->> x) (cond-> x) (cond->> x) (some-> x) (some->> x) (comp x) (partial x) (merge x)

; good x

A number of core functions take any number of arguments and return the arg
if given only one. These calls are effectively no-ops, redundant, so they
should be avoided.

Current list of clojure.core functions this linter checks:
* `->`, `->>`
* `cond->`, `cond->>`
* `some->`, `some->>`
* `comp`, `partial`, `merge`

Examples:

; bad
(-> x)
(->> x)
(cond-> x)
(cond->> x)
(some-> x)
(some->> x)
(comp x)
(partial x)
(merge x)

; good
x
sourceraw docstring

right-fn?clj

(right-fn? sexp)
source

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

× close