Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,14 @@
(de streamMerge @
(let Heap
(make
(while (args)
(let? Fd (next)
(if (in Fd (read))
(link (cons @ Fd))
(close Fd) ) ) ) )
(make
(while Heap
(link (caar (setq Heap (sort Heap))))
(if (in (cdar Heap) (read))
(set (car Heap) @)
(close (cdr (pop 'Heap))) ) ) ) ) )

View file

@ -0,0 +1,11 @@
(test (2 3 14 15 17 18)
(streamMerge
(open "a")
(open "b") ) )
(test (2 2 3 3 5 7 14 15 17 18)
(streamMerge
(open "a")
(open "b")
(open "c")
(open "d") ) )