⍝ First we define a function which recieves a message msg, ⍝ and sends (1+msg) to the task with id ⍵ f←{ (from msg)←{1 ⍵}⍇⍬ (1+msg)⍈⍵ } ⍝ Now start 1000 of those ⊢last←f&'chain'⍣1000 ⊢ ⎕self ⍝ Verify that over 1000 threads are running ≢⎕THREADS 0 ⍝ Start the chain by sending something to the last one, ⍝ and wait for a result run←{ _←⍵⍈last {1 (2⊃⍵)}⍇⍬ } run 0 ⍝ Run it! ⎕threads 0 1 2