Just a warning. I don‘t remember if the pure function is bugged but a custom inout operator definetelly is bugged in Swift 4.1. I‘ll update this post when I‘ll be back at my workstation with a link to a bug-issue. There is a compiler bug related to inout which appears on a release build because of some aggressive optimizations and basically will crash your whole application.