Initial commit

This commit is contained in:
Christopher Baines 2024-11-19 18:43:43 +00:00
commit 2f39c58d6c
27 changed files with 2969 additions and 0 deletions

20
tests/promise.scm Normal file
View file

@ -0,0 +1,20 @@
(use-modules (tests)
(fibers)
(unit-test)
(knots parallelism)
(knots promise))
(run-fibers-for-tests
(lambda ()
(let ((promises
(map (lambda (i)
(fibers-delay
(lambda ()
(* i 2))))
(iota 10))))
(assert-equal
90
(apply + (fibers-map fibers-force promises))))))
(display "promise test finished successfully\n")