aboutsummaryrefslogtreecommitdiffstats
path: root/alv-lib
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2022-01-27 13:58:29 +0000
committers-ol <s+removethis@s-ol.nu>2025-03-02 14:24:49 +0000
commit141d45a8ba34fce1f8710ab5cf917eb5d679bf4e (patch)
tree0ecd226f4266ef1689bc663430fee7472099e481 /alv-lib
parentdocs: show output samples on dark background (diff)
downloadalive-141d45a8ba34fce1f8710ab5cf917eb5d679bf4e.tar.gz
alive-141d45a8ba34fce1f8710ab5cf917eb5d679bf4e.zip
test logic module
Diffstat (limited to 'alv-lib')
-rw-r--r--alv-lib/logic.moon10
1 files changed, 4 insertions, 6 deletions
diff --git a/alv-lib/logic.moon b/alv-lib/logic.moon
index 763638c..d66f53a 100644
--- a/alv-lib/logic.moon
+++ b/alv-lib/logic.moon
@@ -1,4 +1,4 @@
-import PureOp, Constant, T, sig, evt from require 'alv.base'
+import PureOp, Constant, T, any from require 'alv.base'
all_same = (first, list) ->
for v in *list
@@ -14,10 +14,8 @@ tobool = (val) ->
else
true
-any = sig! / evt!
-
class ReduceOp extends PureOp
- pattern: any\rep 2, nil
+ pattern: any!\rep 2, nil
type: T.bool
tick: =>
@@ -107,7 +105,7 @@ not_ = Constant.meta
examples: { '(not a)' }
value: class extends PureOp
- pattern: any\rep 1, 1
+ pattern: any!\rep 1, 1
type: T.bool
tick: => @out\set not tobool @inputs[1]!
@@ -119,7 +117,7 @@ bool = Constant.meta
description: "`false` if a is `false`, `nil` or `0`, `true` otherwise."
value: class extends PureOp
- pattern: any\rep 1, 1
+ pattern: any!\rep 1, 1
type: T.bool
tick: => @out\set tobool @inputs[1]!