[swift-evolution] Shorthand unwrap proposal

Dave Abrahams dabrahams at apple.com
Tue Jun 28 13:15:58 CDT 2016


on Thu Jun 23 2016, James Campbell <swift-evolution at swift.org> wrote:

> Map requires you to return a value you wish to map the optional to, this is
> more like a forEach that only fires when the Optional is .Some

No, you do not need to return a value.

    q.map { print($0) }

works fine.

-- 
Dave



More information about the swift-evolution mailing list