From 23c197522a603939f90587f837c307eae125c9cb Mon Sep 17 00:00:00 2001 From: apt-get Date: Sun, 25 Jan 2026 16:58:44 +0100 Subject: [PATCH] typo fixes & small name changes --- src/cljs/emptyhead/newlib/core.cljs | 2 +- src/cljs/emptyhead/newlib/math/arithmetic.cljs | 2 -- src/cljs/emptyhead/newlib/message.cljs | 10 +++++----- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/cljs/emptyhead/newlib/core.cljs b/src/cljs/emptyhead/newlib/core.cljs index a098849..688a184 100644 --- a/src/cljs/emptyhead/newlib/core.cljs +++ b/src/cljs/emptyhead/newlib/core.cljs @@ -9,7 +9,7 @@ (fn [_thought parent] [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] (fn [thought _parent] [thought nil])) diff --git a/src/cljs/emptyhead/newlib/math/arithmetic.cljs b/src/cljs/emptyhead/newlib/math/arithmetic.cljs index e9a673d..a0bef15 100644 --- a/src/cljs/emptyhead/newlib/math/arithmetic.cljs +++ b/src/cljs/emptyhead/newlib/math/arithmetic.cljs @@ -17,7 +17,6 @@ :data to :reference (str "<" to "+_>"))] (del/add-delegate th [[:EH :PRIM :PARTIAL :+]]) - (extend/register-extension! th [th]) [parent th]))) ;; Final addition, e.g. =(5 +) 5=. @@ -29,7 +28,6 @@ :data [to from] :reference (str "<" to "+" from ">"))] (del/add-delegate th [[:EH :LAZY [:EH :PRIM :NUM]]]) - (extend/register-extension! th [th]) [parent th]))) (def/define! [:EH :LAZY [:EH :PRIM :NUM] :REIFY] diff --git a/src/cljs/emptyhead/newlib/message.cljs b/src/cljs/emptyhead/newlib/message.cljs index ef2d2a2..a8ff26f 100644 --- a/src/cljs/emptyhead/newlib/message.cljs +++ b/src/cljs/emptyhead/newlib/message.cljs @@ -22,8 +22,8 @@ ;; TODO Proper warnings when intend impl does not exist (defn register-single-impl "Wrapper around register-impl for singleton operators." - [to from impl] - (let [th (prtc/reference (thought/get-singleton impl))] + [to from impl-op] + (let [th (prtc/reference (thought/get-singleton impl-op))] (register-impl to from th))) (defn apply-ext @@ -48,7 +48,7 @@ (second (thought/pop-stack (eval/execute! th))))) (defn multi-msg - "Apply multiple messages sequentially. =(:foo :bar :baz)= <-> =((:foo :bar) :baz)." + "Apply multiple messages sequentially. =(:foo :bar :baz)= <-> =((:foo :bar) :baz)=." [& msgs] (reduce apply-msg msgs)) @@ -76,8 +76,8 @@ (def/define! [:EH :MSG :MATCH] (fn [_thought parent] (let [data (thought/data parent) - [to from] (map #(get-in data [:delegates %]) [(:to data) (:from data)]) - stages (for [a to b from] [:EH :IMPL a b]) + [to-dels from-dels] (map #(get-in data [:delegates %]) [(:to data) (:from data)]) + stages (for [a to-dels b from-dels] [:EH :IMPL a b]) parent (assoc parent :ext-stages (vec stages))] [parent nil])))