1 #!/usr/bin/env -S guile -s
4 (add-to-load-path "..")
6 (use-modules (ice-9 streams))
8 (define stream-add-two (make-stream (lambda (state)
9 (if (> state (* 2 (rpc-worker-process-size)))
11 (cons state (+ state 2))))
12 (rpc-worker-process-id)))
14 (define stream-add-one (make-stream (lambda (state)
15 (if (> state (* 2 (rpc-worker-process-size)))
17 (cons state (+ state 1))))
18 (rpc-worker-process-id)))
20 (define (display-all return a b) (display a) (newline) (display b) (newline) (newline))
24 (display "I'm master process.")
27 (rpc-stream-for-each display-all stream-add-one stream-add-two)