Re:Hecto: Build your own text editor in Rust
by Measter on Tuesday January 19, 2021 @12:18PM
(#25835788)
There's nothing stopping you from doing a functional style in Rust, neither: https://play.rust-lang.org/?version=stable&mode=debug&editio...
There is a function on nightly that would make line 16 a little nicer, but oh well.
Most uses of loops break down to map, fold, or similar being able to use them cleanly can avoid a lot of bugs and API plasticity.