Figure out why with-return doesn't work with copy-fn #8

Open
opened 2025-08-19 21:37:27 +00:00 by apt-get · 0 comments
Owner
(defn with-return
  "Returns the thought with all values in data
   added to the top of its stack."
  [thought data]
  (if (first data)
    (prtc/val-fn
     #(update % :return (fnil into []) data) thought)
    thought))

If copy-fn is used instead of val-fn (which theoretically it should be), this breaks everything. Figure out why

```clojure (defn with-return "Returns the thought with all values in data added to the top of its stack." [thought data] (if (first data) (prtc/val-fn #(update % :return (fnil into []) data) thought) thought)) ``` If copy-fn is used instead of val-fn (which theoretically it should be), this breaks everything. Figure out why
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: akko/nothoughts#8
No description provided.