Liking cljdoc? Tell your friends :D

typed.clj.analyzer.passes.beta-reduce


beta-limitclj


ensure-within-beta-limitclj

(ensure-within-beta-limit state & [err-f])

fake-seq-invokeclj

(fake-seq-invoke seq-args env)

find-matching-methodclj

(find-matching-method ast nargs)

make-invoke-exprclj

(make-invoke-expr the-fn args env)

make-var-exprclj

(make-var-expr var env)

maybe-beta-reduce-applyclj

(maybe-beta-reduce-apply {:keys [env] :as ufn}
                         args
                         &
                         [{:keys [before-reduce] :as opts}])

maybe-beta-reduce-fnclj

(maybe-beta-reduce-fn ufn args & [{:keys [before-reduce] :as opts}])

push-invokeclj

(push-invoke state {:keys [op] :as ast})

Push arguments into the function position of an :invoke so the function and arguments are both in the same :invoke node, then reanalyze the resulting :invoke node.

eg. ((let [a 1] identity) 2) ;=> (let [a 1] (identity 2)) eg. ((if c identity first) [1]) ;=> (if c (identity [1]) (first [1]))

Push arguments into the function position of an :invoke
so the function and arguments are both in the
same :invoke node, then reanalyze the resulting :invoke node.

eg. ((let [a 1] identity) 2)
    ;=> (let [a 1] (identity 2))
eg. ((if c identity first) [1])
    ;=> (if c (identity [1]) (first [1]))
raw docstring

reached-beta-limit?clj

(reached-beta-limit? state)

record-beta-reductionclj

(record-beta-reduction state)

splice-seqable-exprclj

(splice-seqable-expr {:keys [op env] :as ast})

If ast is a seqable, returns a vector describing its members. Otherwise nil.

:ordered entry is true if calling first on this expr is ordered

eg. (vector 1 2 3) [{:op :sequential :expr (vector 1 2 3) :min-count 3 :max-count 3}]

eg. (cons 4 (vector 1 2 3)) [{:op :single :expr 4} {:op :sequential :expr (vector 1 2 3) :min-count 3 :max-count}]

eg. (concat (vector 1 2 3) (range 0)) [{:op :sequential :expr (vector 1 2 3) :min-count 3 :max-count 3} {:op :sequential :expr (range 0) :min-count ##Inf :max-count ##Inf}]

eg. (concat (vector 1 2 3) (range 0) (vector 1 2 3)) [{:op :sequential :expr (vector 1 2 3) :min-count 3 :max-count 3} {:op :sequential :expr (range 0) :min-count ##Inf :max-count ##Inf} {:op :sequential :expr (vector 1 2 3) :min-count 3 :max-count 3}]

eg. (range 0) [{:op :sequential :expr (range 0) :min-count ##Inf :max-count ##Inf}]

eg. (range 0 39) [{:op :sequential :expr (range 0 39) :min-count 39 :max-count 39}]

eg. nil [{:op :sequential :expr nil :min-count 0 :max-count 0}]

eg. (take-while symbol? (read-string)) [{:op :sequential :expr (take-while symbol? (read)) :min-count 0 :max-count ##Inf}]

eg. {:a 1 :b 2} [{:op :unordered :expr {:a 1 :b 2} :min-count 2 :max-count 2}]

eg. #{:a :b} [{:op :unordered :expr #{:a :b} :min-count 2 :max-count 2}]

If ast is a seqable, returns a vector describing its members. Otherwise nil.

:ordered entry is true if calling `first` on this expr is ordered

eg. (vector 1 2 3)
[{:op :sequential :expr (vector 1 2 3) :min-count 3 :max-count 3}]

eg. (cons 4 (vector 1 2 3))
[{:op :single :expr 4}
 {:op :sequential :expr (vector 1 2 3) :min-count 3 :max-count}]

eg. (concat (vector 1 2 3) (range 0))
[{:op :sequential :expr (vector 1 2 3) :min-count 3 :max-count 3}
 {:op :sequential :expr (range 0) :min-count ##Inf :max-count ##Inf}]

eg. (concat (vector 1 2 3) (range 0) (vector 1 2 3))
[{:op :sequential :expr (vector 1 2 3) :min-count 3 :max-count 3}
 {:op :sequential :expr (range 0) :min-count ##Inf :max-count ##Inf}
 {:op :sequential :expr (vector 1 2 3) :min-count 3 :max-count 3}]

eg. (range 0)
[{:op :sequential :expr (range 0) :min-count ##Inf :max-count ##Inf}]

eg. (range 0 39)
[{:op :sequential :expr (range 0 39) :min-count 39 :max-count 39}]

eg. nil
[{:op :sequential :expr nil :min-count 0 :max-count 0}]

eg. (take-while symbol? (read-string))
[{:op :sequential :expr (take-while symbol? (read)) :min-count 0 :max-count ##Inf}]

eg. {:a 1 :b 2}
[{:op :unordered :expr {:a 1 :b 2} :min-count 2 :max-count 2}]

eg. #{:a :b}
[{:op :unordered :expr #{:a :b} :min-count 2 :max-count 2}]
raw docstring

subst-localsclj

(subst-locals ast subst)

unwrap-with-metaclj

(unwrap-with-meta ast)

var->vsymclj

(var->vsym v)

visit-tail-posclj

(visit-tail-pos ast f)

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

× close