Went for a walk and had an idea. I think this sample illustrates the answer
to my own question:
#lang slideshow
(define (retract-up-to s retracted)
(let ([newly-retracted (retract-most-recent-slide)])
(if (eq? newly-retracted s)
(cons newly-retracted retracted)
(retract-up-to s (cons newly-retracted retracted)))))
(slide
#:title "Slide 1")
(slide
#:title "Slide 2")
(slide
#:title "Slide 3")
(slide
#:title "Branching slide"
(clickback
(t "1")
(λ ()
(let* ([remainder (retract-up-to remainder-start (list))]
[branch-start #f]
[_ (begin
(slide #:title "1"
(clickback
(t "a")
(λ ()
(slide #:title "a"
(clickback
(t "resume remainder")
(λ ()
(retract-up-to branch-start '())
(re-slide (car remainder))
(start-at-recent-slide)
(for ([rem-sl (cdr remainder)])
(re-slide rem-sl)))))
(start-at-recent-slide))))
(set! branch-start (most-recent-slide)))])
(start-at-recent-slide)))))
(define branching-slide (most-recent-slide))
(slide
#:title "Remainder 1")
(define remainder-start (most-recent-slide))
(slide
#:title "Remainder 2")
(slide
#:title "Remainder 3")
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.