Closed miguel-negrao closed 2 years ago
I've placed changes next to hold as I think it as has a relationship to hold, since the following holds:
inputs === fst (runIdentity $ steps (changes >>> hold (head inputs)) inputs
So
changes >>> hold a
is similar to identity.
Cool, if this holds, could you add a test?
Cool, if this holds, could you add a test?
The test for that property was already in the PR, it's in essence-of-live-coding/test/Cell/Util.hs . It has 3 tests in total.
The property can also be stated as delay a >>> changes >>> hold a == delay a
, maybe I should change the test and the haddock to state it like this ?
, testProperty "delay a >>> changes >>> hold a == delay a"
$ \(inputs :: [Int]) (startValue :: Int) -> fst (runIdentity $ steps (delay startValue) inputs) ===
fst (runIdentity $ steps (delay startValue >>> changes >>> hold startValue) inputs)
This test passes.
Ok, changed the test and haddock to delay a >>> changes >>> hold a == delay a
Incorporated your suggestions, thanks for the review ! :)
Let's merge https://github.com/turion/essence-of-live-coding/pull/91/ first though, so we can test the changes on the new CI :sparkles:
Ok, can you rebase, then the CI will run thanks to your previous PR :tada:
I think this is ok to merge, right ?
Yes, I lost track, sorry.
I've placed changes next to hold as I think it as has a relationship to hold, since the following holds:
So
changes >>> hold a
is similar to identity.