Created
April 24, 2017 23:31
-
-
Save lancegatlin/56f5207d52174b690572e7d2f932967e to your computer and use it in GitHub Desktop.
Exec type-class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait Exec[F[_]] extends Monad[F] { | |
/** | |
Execute a block of code in in the context of F | |
F may execute code block asynchronously, synchronously or may suspend execution. | |
Note: if F suspends execution, this typeclass does not define how to execute the suspended code | |
F may capture effects or may not capture effects | |
F may catch exceptions or may not catch exceptions | |
*/ | |
def exec(f: => A) : F[A] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment