todd.ginsberg
12/07/2019, 7:10 PMIntCodeComputer
so that Day 2 and 5 work without changes to the caller. Inputs were changed from Lists to Channels (I didn't do the Receive/Send channel thing, but I should probably). To catch the final output of E, I wrote a dongle so to speak that listens on a channel and remembers the last value it received before passing it on. So I can do dongle(outputFromE, inputToA).Joris PZ
12/07/2019, 7:25 PMChannel
implements both the ReceiveChannel
and the SendChannel
interface, so it's really just a matter of using the proper one as your parameter type for some extra type safety and signaling the intended use of the channel.todd.ginsberg
12/07/2019, 8:24 PMJoris PZ
12/07/2019, 9:25 PMstkent
12/08/2019, 4:19 AMstkent
12/08/2019, 4:23 AMstkent
12/08/2019, 4:23 AMstkent
12/08/2019, 4:33 AMtodd.ginsberg
12/08/2019, 3:40 PMJoris PZ
12/08/2019, 3:51 PMlaunch
them all, and the coroutineScope you declared won't finish until all the launched coroutines have, so you wouln't need any join or await at alltodd.ginsberg
12/08/2019, 3:53 PMtodd.ginsberg
12/08/2019, 3:54 PMJoris PZ
12/08/2019, 3:58 PMtodd.ginsberg
12/08/2019, 4:00 PMkarelpeeters
12/08/2019, 8:02 PMJoris PZ
12/08/2019, 8:44 PMtodd.ginsberg
12/08/2019, 9:25 PM