⍝ First we define a function which recieves a message, ⍝ and sends one to the task with id ⍵ f←{ (from msg)←{1 ⍵}⍇⍬ (1+msg)⍈⍵ } ⍝ Now start 10000 of those last←f&'chain'⍣10000⊢⎕self ≢⎕THREADS 0 ⍝ Start the chain by sending something to the last one 0 ⍈ last ⎕threads 0 1 2 {1 (2⊃⍵)}⍇0 ⍝ We only pick out the message part, not the sender