Add merge-children-into-props function

This commit is contained in:
paku 2024-05-26 13:57:51 +09:00
parent 55cf69582f
commit ab34b5dbb6

View file

@ -32,9 +32,8 @@
(props element-props)
(children element-children)) elm
(if (functionp type)
(apply type (append props
(and children
(list :children children))))
(apply type
(merge-children-into-props props children))
elm)))
(defun flatten (x)
@ -45,3 +44,8 @@
(car x)
(rec (cdr x) acc))))))
(rec x nil)))
(defun merge-children-into-props (props children)
(append props
(and children
(list :children children))))