mount

ben 2019-04-24T16:30:11.001400Z

What is the idiomatic way to apply a function to a mount state (for testing). I am imagining something like mount/swap but which supplies a fn rather than a value

2019-04-24T17:27:59.002100Z

@ben606 is start-with-states[1] what you're looking for? https://github.com/tolitius/mount#swapping-states-with-states

ben 2019-04-24T18:46:19.004600Z

I don’t think so. It looks like this just takes a couple of zero-story fns and invokes then on start and stop. What I’m thinking of is a 1-argument function that is invoked with the state as an argument. Although as I type that, I can see how my question might not even make sense.

ben 2019-04-24T18:46:57.005500Z

In the meantime I have found a workaround by using with-redefs on an accessor fn

👍 1