mount

tolitius 2018-06-25T13:44:34.000166Z

not following ) but if it keeps state and can't be localized (i.e. (let [foo (promise p)] do with foo...)) it could be a "state". are you using this promise as you would use a "core.async" channel?

richiardiandrea 2018-06-25T16:48:29.000410Z

@tolitius I am using it as part of a general flow, which, among other things, does some external call and returns a promise (or a channel actually)

richiardiandrea 2018-06-25T16:49:02.000743Z

so at the moment I have a protocol of async functions

richiardiandrea 2018-06-25T16:49:25.000272Z

and I am testing them by swapping in my own implementation during testing - say one that times out

richiardiandrea 2018-06-25T16:49:51.000712Z

it works well but the record implementing the protocol feels unnecessary

tolitius 2018-06-25T17:49:59.000131Z

yea, I would agree, channel as a "state" works better here. "record implementing the protocol" is a slippery slope 🙂