core-async

ataggart 2019-11-12T00:03:05.115300Z

Is there an out-of-the-box inverse of to-chan that I'm not seeing? I wrote my own implementation, but it seems like something that would already exist.

2019-11-12T00:05:33.115700Z

into

ataggart 2019-11-12T00:06:32.116Z

🤦

ataggart 2019-11-12T00:06:58.116300Z

... yep... I knew that.

ataggart 2019-11-12T00:07:23.116500Z

deleting code

ataggart 2019-11-12T00:30:24.118900Z

Hmm, I thought I knew that, but I think that was just for applying an xform. I not seeing how to use into to consume from a channel.

ataggart 2019-11-12T00:31:06.119500Z

The intent is:

(a/<!! (collect (a/to-chan [1 2 3])))
=> [1 2 3]
Which admittedly seems silly.

ghadi 2019-11-12T00:31:40.120100Z

into takes a source channel of items, and returns a channel of a collection

ghadi 2019-11-12T00:31:51.120400Z

it will only return the collection after the source channel closes

ataggart 2019-11-12T00:32:21.120900Z

sigh, async into, not core into

alexmiller 2019-11-12T00:32:28.121300Z

you can reduce off a channel too

ataggart 2019-11-12T00:32:30.121400Z

ok, no more work for me today

ghadi 2019-11-12T00:33:04.122100Z

heh, I ran into my wall an hour ago 🙂

1