Rust: Problem 2 - Refactor to functional
Scala: Problem 11