typo fixes & small name changes

This commit is contained in:
2026-01-25 16:58:44 +01:00
parent 335377587b
commit 23c197522a
3 changed files with 6 additions and 8 deletions

View File

@@ -9,7 +9,7 @@
(fn [_thought parent] (fn [_thought parent]
[parent nil])) [parent nil]))
;; Container: Used for chaining multiple operations. Returns intself rather than its parent! ;; Container: Used for chaining multiple operations. Returns itself rather than its parent!
(def/define! [:EH :CORE :CONTAINER] (def/define! [:EH :CORE :CONTAINER]
(fn [thought _parent] (fn [thought _parent]
[thought nil])) [thought nil]))

View File

@@ -17,7 +17,6 @@
:data to :data to
:reference (str "<" to "+_>"))] :reference (str "<" to "+_>"))]
(del/add-delegate th [[:EH :PRIM :PARTIAL :+]]) (del/add-delegate th [[:EH :PRIM :PARTIAL :+]])
(extend/register-extension! th [th])
[parent th]))) [parent th])))
;; Final addition, e.g. =(5 +) 5=. ;; Final addition, e.g. =(5 +) 5=.
@@ -29,7 +28,6 @@
:data [to from] :data [to from]
:reference (str "<" to "+" from ">"))] :reference (str "<" to "+" from ">"))]
(del/add-delegate th [[:EH :LAZY [:EH :PRIM :NUM]]]) (del/add-delegate th [[:EH :LAZY [:EH :PRIM :NUM]]])
(extend/register-extension! th [th])
[parent th]))) [parent th])))
(def/define! [:EH :LAZY [:EH :PRIM :NUM] :REIFY] (def/define! [:EH :LAZY [:EH :PRIM :NUM] :REIFY]

View File

@@ -22,8 +22,8 @@
;; TODO Proper warnings when intend impl does not exist ;; TODO Proper warnings when intend impl does not exist
(defn register-single-impl (defn register-single-impl
"Wrapper around register-impl for singleton operators." "Wrapper around register-impl for singleton operators."
[to from impl] [to from impl-op]
(let [th (prtc/reference (thought/get-singleton impl))] (let [th (prtc/reference (thought/get-singleton impl-op))]
(register-impl to from th))) (register-impl to from th)))
(defn apply-ext (defn apply-ext
@@ -48,7 +48,7 @@
(second (thought/pop-stack (eval/execute! th))))) (second (thought/pop-stack (eval/execute! th)))))
(defn multi-msg (defn multi-msg
"Apply multiple messages sequentially. =(:foo :bar :baz)= <-> =((:foo :bar) :baz)." "Apply multiple messages sequentially. =(:foo :bar :baz)= <-> =((:foo :bar) :baz)=."
[& msgs] [& msgs]
(reduce apply-msg msgs)) (reduce apply-msg msgs))
@@ -76,8 +76,8 @@
(def/define! [:EH :MSG :MATCH] (def/define! [:EH :MSG :MATCH]
(fn [_thought parent] (fn [_thought parent]
(let [data (thought/data parent) (let [data (thought/data parent)
[to from] (map #(get-in data [:delegates %]) [(:to data) (:from data)]) [to-dels from-dels] (map #(get-in data [:delegates %]) [(:to data) (:from data)])
stages (for [a to b from] [:EH :IMPL a b]) stages (for [a to-dels b from-dels] [:EH :IMPL a b])
parent (assoc parent :ext-stages (vec stages))] parent (assoc parent :ext-stages (vec stages))]
[parent nil]))) [parent nil])))