[0.15.17] Decider combinator bug
Posted: Thu Jun 01, 2017 6:47 pm
Decider will pass any 'Everything' conditional if input has no signals.
Code: Select all
? (defun combinator-equal-1 (&rest signal-values)
(every (lambda (v) (= v 1))
(remove-if #'zerop signal-values)))
COMBINATOR-EQUAL-1
? (combinator-equal-1 1 1 1) ; 3 signals, all are one
T
? (combinator-equal-1 1 2 1) ; 3 signals, two are one and one is two
NIL
? (combinator-equal-1 1 2) ; 2 signals, a one and a two
NIL
? (combinator-equal-1 1 1) ; 2 signals, both one
T
? (combinator-equal-1 1) ; 1 signal, a one
T
? (combinator-equal-1 2) ; 1 signal, a two
NIL
? (combinator-equal-1) ; No signals
T
? (combinator-equal-1 1 0 1) ; "3" signals, two ones and a zero (the zero is ignored)
T
? (combinator-equal-1 0) ; "1" signal, a zero (which is ignored)
T