[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)

  (##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))))))
  (define (acu-pmap f lst) (map f lst))))

(write (list "test pmap" (acu-pmap (lambda (x) (+ 1 x)) '(1 2 3))))


More information about the Snow-users-list mailing list