[gambit-list] [Snow-users-list] Using Termite + Snow
andrew cooke
andrew at acooke.org
Tue Sep 25 20:56:49 EDT 2007
sorry for the noise - found the solution. turns outa bunch more symbols
were needed (this was easy once i realised "!" was apparently picking up
some other definition as the other symbols appeared in error messages).
the correct code is:
":";exec snow -- "$0" "$@"
(package* test/v1.0.0)
(cond-expand
(gambit
(##namespace ("" self spawn recv ! match/action termite-exception?))
(define (acu-pmap f lst)
(let ((parent (self)))
(map (lambda (pid)
(write (list "recv" pid)) (newline)
(recv ((,pid reply) reply)))
(map (lambda (x)
(write (list "spawn")) (newline)
(spawn (lambda () (! parent (list (self) (f x))))))
lst)))))
(else
(define (acu-pmap f lst) (map f lst))))
(write (list "test pmap" (acu-pmap (lambda (x) (+ 1 x)) '(1 2 3))))
andrew
More information about the Gambit-list
mailing list