I'm trying to learn Clojure but my synapses seem to be hard-wired to Smalltalk.
What's the equivalent of this function?
[:n :k | (1 to: k) inject: 1 into: [:c :i | c * (n - k + i / i)]]
The clojure equivalent of lst inject: s into: f
is (reduce f s lst)
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