This commit is contained in:
Akko
2025-08-04 18:57:35 +02:00
parent be5d5350f4
commit 25b94b8d85
15 changed files with 380 additions and 45 deletions

View File

@@ -0,0 +1,15 @@
(ns emptyhead.lib.compose
(:require [emptyhead.idea.memtag :as memtag]
[emptyhead.thought.extend :as extend]
[emptyhead.thought.crud :as thought]
[emptyhead.thought.define :as def]))
;; Append `(:data thought)` as execution child of `parent`.
(def/define! [:emptyhead :compose :append]
(fn [thought parent]
(let [op (:data thought)
stage [:emptyhead :compose :append (memtag/uid-of parent) (memtag/uid-of op)]
op (extend/register-extension! op stage)
parent (thought/add-ext-stage! parent stage)]
[parent nil])))