summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/demo.apl16
-rw-r--r--tests/demo2.apl8
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