From e38cda02612ca417d59a97b2c69a1d085d9d377c Mon Sep 17 00:00:00 2001 From: Dane Johnson Date: Mon, 11 Nov 2024 22:15:04 -0600 Subject: [PATCH] Use new generator syntax --- demo.scm | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/demo.scm b/demo.scm index abf0933..8d32939 100644 --- a/demo.scm +++ b/demo.scm @@ -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)