(form-apply form args)
Applies a list as a function to an argument vector
(form-apply '(+ 1 %1 %2) [2 3]) => 6
Applies a list as a function to an argument vector (form-apply '(+ 1 %1 %2) [2 3]) => 6
(form-eval form & args)
Evaluates a list as a functions and to a set of arguments.
(form-eval '(+ 1 %1 %2) 2 3) => 6
Evaluates a list as a functions and to a set of arguments. (form-eval '(+ 1 %1 %2) 2 3) => 6
(form-fn form)
Creates a function out of a list (def my-inc (form-fn '(+ 1 %)))
(my-inc 1) => 2 (meta my-inc) => {:source "#(+ 1 %)\n"}
Creates a function out of a list (def my-inc (form-fn '(+ 1 %))) (my-inc 1) => 2 (meta my-inc) => {:source "#(+ 1 %)\n"}
(form-prep form)
Prepares the form into a function form
Prepares the form into a function form
(form-require x)
Makes sure that the namespace is loaded for a particular symbol
(form-require 'cons) => 'cons
(form-require 'clojure.core/cons) => 'clojure.core/cons
Makes sure that the namespace is loaded for a particular symbol (form-require 'cons) => 'cons (form-require 'clojure.core/cons) => 'clojure.core/cons
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close