Use new generator syntax

This commit is contained in:
Dane Johnson 2024-11-11 22:15:04 -06:00
parent cd2a616ccb
commit e38cda0261

View File

@ -20,17 +20,16 @@
graph))
(define djikstra-generator
(make-generator
(lambda (yield)
(djikstra graph 90 9 (lambda (visited heap)
(yield (color-graph graph visited heap))))
#f)))
(generator
(djikstra graph 90 9 (lambda (visited heap)
(yield (color-graph graph visited heap))))
#f))
(define a*-generator
(make-generator
(lambda (yield)
(a* graph 90 9 (lambda (visited heap)
(yield (color-graph graph visited heap))))
#f)))
(generator
(a* graph 90 9 (lambda (visited heap)
(yield (color-graph graph visited heap))))
#f))
(write-graphs-to-file "djikstra.webp" djikstra-generator)
(write-graphs-to-file "astar.webp" a*-generator)