14 lines
424 B
Racket
14 lines
424 B
Racket
#lang syndicate
|
|
;;; SPDX-License-Identifier: LGPL-3.0-or-later
|
|
;;; SPDX-FileCopyrightText: Copyright © 2021-2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
|
|
|
(module+ test
|
|
(standard-actor-system (ds)
|
|
(spawn
|
|
(define (loop n)
|
|
(log-info "loop ~v" n)
|
|
(when (positive? n)
|
|
(react (on-start (send! ds (- n 1)))
|
|
(at ds (stop-on (message $n) (loop n))))))
|
|
(loop 5))))
|