Which is more idiomatic? Functional, imperative or a mix?

A post was split to a new topic: Difficulty of function currying in Rust