These behaviors are different, but what we have done is replace the bindings.
Next, merge function
main :: Effect Unit
main = do
channel1 <- channel true
channel2 <- channel true
let
mergedSignal = merge (subscribe channel1) (subscribe channel2)
send channel2 false
logShow =<< get mergedSignal
output false
main :: Effect Unit
main = do
channel1 <- channel true
channel2 <- channel true
send channel2 false
let
mergedSignal = merge (subscribe channel1) (subscribe channel2)
logShow =<< get mergedSignal
outputs true
For the same reason, filters are not referentially transparent either.
I would like to modify these APIs, but in fact, this package references Elm's APIs, so it may not be a good idea to make direct changes.
In other words, there are two options
Modify the this Signal package
Create a new, modified package
Do you have any suggestions on the pros and cons of modifying this package, or any other suggestions?
First,
every
function.outputs
outputs
These behaviors are different, but what we have done is replace the bindings.
Next,
merge
functionoutput
false
outputs
true
For the same reason, filters are not referentially transparent either.
I would like to modify these APIs, but in fact, this package references Elm's APIs, so it may not be a good idea to make direct changes. In other words, there are two options
Do you have any suggestions on the pros and cons of modifying this package, or any other suggestions?