base impl, not a lot of lines compared to F#, Haskel, D, Rust, not even using streams...