haxetink / tink_core

Core utilities
https://haxetink.github.io/tink_core
MIT License
117 stars 33 forks source link

Lazily handling a future #146

Closed kevinresol closed 3 years ago

kevinresol commented 3 years ago

Currently it can be done with a workaround:

future.map(v -> {sideEffects(); v;});

This is useful when the side effect has to be performed when the future resolves, but not necessarily triggers the future to load.