Created
December 6, 2017 14:59
-
-
Save gszeliga/2456c5844fd30aed0af1da261db8783e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn w-aggregate [channel] | |
(go-loop [c 0 s 0.0] | |
(if-some [n (<! channel)] | |
(recur (inc c) (+ n s)) | |
[s c]))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment