diff options
author | Peter Mikkelsen <petermikkelsen10@gmail.com> | 2022-05-16 16:30:28 +0000 |
---|---|---|
committer | Peter Mikkelsen <petermikkelsen10@gmail.com> | 2022-05-16 16:30:28 +0000 |
commit | d3693f4406f3ba6db150655ef9b5935fa05f8156 (patch) | |
tree | 05f922732a2d4537294c4af161494e4b19791f22 | |
parent | 60f286cb434bd67bb1af67823ae16afa460d8f48 (diff) |
Update demos
-rw-r--r-- | tests/demo.apl | 16 | ||||
-rw-r--r-- | tests/demo2.apl | 8 |
2 files changed, 18 insertions, 6 deletions
diff --git a/tests/demo.apl b/tests/demo.apl index d83fdf9..5a70a23 100644 --- a/tests/demo.apl +++ b/tests/demo.apl @@ -5,7 +5,7 @@ ⍝ even though one does the computation in a different thread. iotaServer←{ - msg←1⍨⍇⍬ + msg←{1 ⍵}⍇⍬ msg≡'stop': ⎕←'Bye bye from indexer' (from num)←msg _←(⍳num)⍈from @@ -25,15 +25,19 @@ stop←{ flush←{ ⍺←0 - 12::⍺ - msg←1⍨⍇0 - _←⎕←'Flush' (⍺+⎕IO) msg - (⍺+1)∇⍵ + 12::⍵ + msg←⍶⍇0 + acc←⍺{ + (a b)←⍵ + ⍺=0:,⊂b + a,⊂b + }⍵ msg + (⍺+1)∇acc } iota←{ 11::'Sorry, the iota server is not running' 12::'Sorry, the iota server was too slow to respond' _←(⎕self ⍵)⍈id - 1⍨⍇⍺ + {1 ⍵}⍇⍺ } diff --git a/tests/demo2.apl b/tests/demo2.apl new file mode 100644 index 0000000..f16c524 --- /dev/null +++ b/tests/demo2.apl @@ -0,0 +1,8 @@ +spam←{ ⍈∘⍵¨?⍨⍺ } + +recvEven←{ + { + 0=⌊2|⍵:1 ⍵ + 0 + }⍇⍵ +}
\ No newline at end of file |