[swift-evolution] Shorthand unwrap proposal

Rob Mayoff mayoff at dqd.com
Fri Jun 24 22:21:48 CDT 2016


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.


More information about the swift-evolution mailing list