I'm going through the Gleam Language Tour and noticed something that confused me.
On the https://tour.gleam.run/standard-library/list-module/ page there is an example for fold that goes as follows: io.debug(list.fold(ints, 0, fn(count, e) { count + e }))
Shouldn't that be: io.debug(list.fold(ints, 0, fn(e, count) { count + e })) because ints maps to iterating over e and count is the running total? The result is the same in this case, but might not always be?
An interactive introduction and reference to the Gleam programming language. Learn Gleam in your browser!