From d3693f4406f3ba6db150655ef9b5935fa05f8156 Mon Sep 17 00:00:00 2001 From: Peter Mikkelsen Date: Mon, 16 May 2022 16:30:28 +0000 Subject: Update demos --- tests/demo.apl | 16 ++++++++++------ tests/demo2.apl | 8 ++++++++ 2 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 tests/demo2.apl 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 -- cgit v1.2.3