core-async

smnplk 2018-12-29T01:50:39.008400Z

@caleb.macdonaldblack isn't that load-urls function missing a (when urls ... check ?

smnplk 2018-12-29T01:51:14.008800Z

Also, it's called without specifying a channel

caleb.macdonaldblack 2018-12-29T01:56:08.011Z

Im not sure if the nil check on the url is necessary here, however it is odd the example doesn't pass in a channel into 'load-urls'

caleb.macdonaldblack 2018-12-29T01:58:51.013900Z

Perhaps put! can take nil instead of a channel? But then wouldnt the call to load-urls throw an arity exception? Maybe its just an example to explain how put! works but the actual code and whether or not it runs doesn't matter for the explaination

smnplk 2018-12-29T23:18:53.017800Z

@caleb.macdonaldblack I am pretty sure it's just docs written in a hurry. Nil check on urls parameter is necessary, because in the callback to put! we are basically calling (load-urls (next urls) .. Next returns nil once we process last url. Then calling (first nil) throws NullPonterException.

smnplk 2018-12-29T23:19:32.018400Z

Anyway, it's just a minor thing.

caleb.macdonaldblack 2018-12-29T23:22:59.018600Z

Ahh i see