This is equivalent to the “Add an ifPresent function to Optional” suggestion made back in March.
http://thread.gmane.org/gmane.comp.lang.swift.evolution/9173 Personally I'd prefer an `ifPresent` or `foreach` method to using `map`, as `ifPresent` or `foreach` would make it clearer to the reader that no return value is expected or wanted from either `ifPresent` or the block it calls. _______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
