Doc fixes suggested by jonas
This commit is contained in:
parent
6b6822a749
commit
370a0829d1
2 changed files with 9 additions and 9 deletions
|
@ -30,7 +30,7 @@
|
||||||
;; given the expression `(+ (f x) 1)` and the rule `[(+ ?x 1) (inc ?x)]`,
|
;; given the expression `(+ (f x) 1)` and the rule `[(+ ?x 1) (inc ?x)]`,
|
||||||
;; the expression `(inc (f x))` is built. This is all handled by `core.logic`.
|
;; the expression `(inc (f x))` is built. This is all handled by `core.logic`.
|
||||||
|
|
||||||
;; TODO run*, ==, and why `first` needs to be called
|
;; (More docs on use of `run*` and `==` to come)
|
||||||
;;
|
;;
|
||||||
;; Finally, if unification succeeds, a map containing the original
|
;; Finally, if unification succeeds, a map containing the original
|
||||||
;; expression (`:expr`), the line where it appeared in the source file
|
;; expression (`:expr`), the line where it appeared in the source file
|
||||||
|
@ -82,7 +82,8 @@
|
||||||
;; --------------------
|
;; --------------------
|
||||||
|
|
||||||
;; `read-ns` is intended to be used with a Clojure source file,
|
;; `read-ns` is intended to be used with a Clojure source file,
|
||||||
;; but will work for anything wrapped in a LinNumberingPushbackReader.
|
;; read in by a LineNumberingPushbackReader. Expressions are
|
||||||
|
;; extracted using the clojure reader (ala `read`).
|
||||||
;; Line numbers are added as `:line` metadata to the forms.
|
;; Line numbers are added as `:line` metadata to the forms.
|
||||||
(defn read-ns
|
(defn read-ns
|
||||||
"Generate a lazy sequence of top level forms from a
|
"Generate a lazy sequence of top level forms from a
|
||||||
|
@ -110,8 +111,8 @@
|
||||||
;; x)`
|
;; x)`
|
||||||
;;
|
;;
|
||||||
(defn expr-seq
|
(defn expr-seq
|
||||||
"Given an expreesion seq, return a lazy (depth-first) sequence of expr and all its
|
"Given an expression (any piece of Clojure data), return a lazy (depth-first)
|
||||||
sub-expressions"
|
sequence of the expr and all its sub-expressions"
|
||||||
[expr]
|
[expr]
|
||||||
(tree-seq sequential?
|
(tree-seq sequential?
|
||||||
seq
|
seq
|
||||||
|
|
|
@ -23,9 +23,8 @@
|
||||||
;; [core](#jonase.kibit.core) namespace
|
;; [core](#jonase.kibit.core) namespace
|
||||||
|
|
||||||
|
|
||||||
|
;; A map of the individual rule sets, keyed by rule group
|
||||||
(def "A map of the individual rule sets, keyed by rule group"
|
(def rule-map {:control-structures control/rules
|
||||||
rule-map {:control-structures control/rules
|
|
||||||
:arithmetic arith/rules
|
:arithmetic arith/rules
|
||||||
:misc misc/rules})
|
:misc misc/rules})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue