diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-04-28 18:23:11 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2020-04-28 18:23:11 +0000 |
| commit | 8b4937844f0568411bc0bb5c1a185ece5ea922d5 (patch) | |
| tree | 12006910086b62f9449f51e2ac5b4c5b61760fbf | |
| parent | fix util/edge (diff) | |
| download | alive-8b4937844f0568411bc0bb5c1a185ece5ea922d5.tar.gz alive-8b4937844f0568411bc0bb5c1a185ece5ea922d5.zip | |
fix logic/not and logic/bool
| -rw-r--r-- | alv-lib/logic.moon | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/alv-lib/logic.moon b/alv-lib/logic.moon index 62de1c1..3c893df 100644 --- a/alv-lib/logic.moon +++ b/alv-lib/logic.moon @@ -120,13 +120,13 @@ not_ = ValueStream.meta examples: { '(not a)' } value: class extends Op - new: => super 'bool' - - setup: (inputs) => - { value } = match 'any', inputs - super value: Input.hot value + setup: (inputs) => + @out or= ValueStream 'bool', false + value = val!\match inputs + super value: Input.hot value - tick: => @out\set not tobool @inputs.value! + tick: => + @out\set not tobool @inputs.value! bool = ValueStream.meta meta: @@ -138,10 +138,11 @@ bool = ValueStream.meta value: class extends Op setup: (inputs) => @out or= ValueStream 'bool' - { value } = val!\match inputs + value = val!\match inputs super value: Input.hot value - tick: => @out\set tobool @inputs\value! + tick: => + @out\set tobool @inputs.value! { :eq, '==': eq |
