vapor / async-kit

Sugary extensions for the SwiftNIO library
MIT License
71 stars 25 forks source link

Optional Futures #29

Closed calebkleveter closed 5 years ago

calebkleveter commented 5 years ago

Fixes https://github.com/vapor/nio-kit/issues/1

let future = eventLoop.makeSucceededFuture(1)

future.optionalMap { int in int * 2 }
future.optionalFlatMap { int in int.save(to: database) }

Checklist

calebkleveter commented 5 years ago

@tanner0101 @MrLotU Ready for a re-review.

calebkleveter commented 5 years ago

@MrLotU @tanner0101 Ready for re-review.

penny-coin commented 5 years ago

Hey @calebkleveter, you just merged a pull request, have a coin!

You now have 458 coins.