From 0f1552c7a132ed59160a930464e46b2a1a345fa5 Mon Sep 17 00:00:00 2001 From: glenda Date: Fri, 9 Sep 2022 22:05:58 +0000 Subject: Add names to send and recv --- tests/chain.apl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'tests/chain.apl') diff --git a/tests/chain.apl b/tests/chain.apl index b825bbb..62bc1a9 100644 --- a/tests/chain.apl +++ b/tests/chain.apl @@ -1,9 +1,12 @@ +send←⍈ ⍝ I can't type those easily so give them names +recv←⍇ + worker←{ - msg←{1 ⍵}⍇⍬ + msg←{1 ⍵}recv ⍬ ⍵≡⍬: ⎕←'DONE' - ⎕←'Worker id ',(⍕⎕self),' got message: ',(⍕msg) + ⎕←'Worker id ',(⍕⎕self),' (',(⎕self ⎕tasks 1),') got message: ',(⍕msg) ⎕←'Forwarding from ',(⍕⎕self), ' to ',⍕⍵ - msg⍈⍵ + msg send ⍵ } -last←worker&⍣10⊢⍬ -'Hello there'⍈last +last←worker&'worker'⍣10⊢⍬ +'Hello there' send last -- cgit v1.2.3