replace fold-right append with flatten in type-convert-to-c

They are not equivalent, but it'll be allright in this
case. Probably. Passes tests at least.
This commit is contained in:
2025-10-30 12:24:38 +03:00
committed by Pavel Kulyov
parent 9e50df5c44
commit c483b81f1c
2 changed files with 24 additions and 3 deletions

View File

@@ -145,9 +145,9 @@
(if (atom? type) (atom-to-fmt-c type)
(flatten
(tree-map atom-to-fmt-c
(fold-right append (list)
(list-join (reverse (list-split type '*))
'(*)))))))
(flatten
(list-join (reverse (list-split type '*))
'(*)))))))
(define (walk-fn-def form)
(match form