summaryrefslogtreecommitdiff
path: root/tests/demo.apl
diff options
context:
space:
mode:
authorPeter Mikkelsen <petermikkelsen10@gmail.com>2022-05-16 16:30:28 +0000
committerPeter Mikkelsen <petermikkelsen10@gmail.com>2022-05-16 16:30:28 +0000
commitd3693f4406f3ba6db150655ef9b5935fa05f8156 (patch)
tree05f922732a2d4537294c4af161494e4b19791f22 /tests/demo.apl
parent60f286cb434bd67bb1af67823ae16afa460d8f48 (diff)
Update demos
Diffstat (limited to 'tests/demo.apl')
-rw-r--r--tests/demo.apl16
1 files changed, 10 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 ⍵}⍇⍺
}