Fork me on GitHub
#core-async
<
2018-02-28
>
blackawa08:02:14

Small problem with <! and >!; I always forget which is put function. How do you remember?

schmee09:02:17

@blackawa look at the way the arrow is pointing: in (>! chan v) the arrow points toward the channel to suggest something being put in, so it’s a put. in (<! chan) the arrow points away from the channel to suggest something being taken out of it, so it’s a take

blackawa12:02:00

@schmee Thank you for advice. That sounds a good way to remember!

noisesmith18:02:05

@blackawa: another thing that works with that way of looking (let [x (<! c)] ...) - value comes out of c into x

noisesmith18:02:40

though there's nothing similar for >! without getting silly with ->> or something