I am writing a utility in Scala that includes a "file copy" actor. I send file names to be copied and the actor does them one at a time.
How would I to do the same thing in Clojure using agents?
Why you need to perform this using agents? because you want to copy them asynchronously? But if you still want to do this, you can use something like:
(do-all (for [x file-names] (send-off agent-name copy-function x)))
although, maybe it's better to use futures?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With