Fork me on GitHub
#core-async
<
2018-02-25
>
carocad18:02:26

Hey guys, quick question. Does anybody has experience using halt-when on channels? I haven't been able to find any examples of it :(

noisesmith18:02:00

@carocad I've never used it, but was able to do this based on the docs - the channel closes when the input matches the predicate https://gist.github.com/noisesmith/335606e11056ae6aca0fe983e92d6bf9

noisesmith18:02:56

@carocad - I just updated the paste to also use the optional retf arg - seems like it gets the buffer of the channel as the first arg, and the value that was rejected as the second

carocad18:02:53

@noisesmith that is great ! Thanks for the gist. I will test this when I have the chance but I think that your input was more than sufficient 🙂