Use new generator syntax
This commit is contained in:
parent
cd2a616ccb
commit
e38cda0261
19
demo.scm
19
demo.scm
@ -20,17 +20,16 @@
|
|||||||
graph))
|
graph))
|
||||||
|
|
||||||
(define djikstra-generator
|
(define djikstra-generator
|
||||||
(make-generator
|
(generator
|
||||||
(lambda (yield)
|
(djikstra graph 90 9 (lambda (visited heap)
|
||||||
(djikstra graph 90 9 (lambda (visited heap)
|
(yield (color-graph graph visited heap))))
|
||||||
(yield (color-graph graph visited heap))))
|
#f))
|
||||||
#f)))
|
|
||||||
(define a*-generator
|
(define a*-generator
|
||||||
(make-generator
|
(generator
|
||||||
(lambda (yield)
|
(a* graph 90 9 (lambda (visited heap)
|
||||||
(a* graph 90 9 (lambda (visited heap)
|
(yield (color-graph graph visited heap))))
|
||||||
(yield (color-graph graph visited heap))))
|
#f))
|
||||||
#f)))
|
|
||||||
(write-graphs-to-file "djikstra.webp" djikstra-generator)
|
(write-graphs-to-file "djikstra.webp" djikstra-generator)
|
||||||
(write-graphs-to-file "astar.webp" a*-generator)
|
(write-graphs-to-file "astar.webp" a*-generator)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user