Random internet people explaining math better then math teacher
Random internet people explaining math better then math teacher
You're viewing a single thread.
Wouldn't reducer be more precise?
5 0 ReplyI think this is pretty much the imperative equivalent of
foldl (\acc i -> acc + 3*i) 0 [1..4]
.4 0 ReplyCan you explain this out a bit more? I'm a self-taught programmer, of sorts, and I'm not quite getting this...
3 0 ReplyA reducer “reduces” a list of values to one value with some function by applying it to 2 values at the time.
For instance if you reduce the list [1, 2, 3] with the sum function you get (1 + (2 + 3)) = 6.
3 0 Reply
Definitely, although I’m sure that under the hood it’s all the same. Some (albeit high-level) languages also support a sum function that takes a generator as an input, which seems pretty close to this math notation.
1 0 Reply