Created
July 13, 2017 06:32
-
-
Save anonymous/e2a531cebf80c6229caa8fae3f1ca0a4 to your computer and use it in GitHub Desktop.
the description for this gist
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
@module trait AllTheMath { | |
val basic: BasicMath | |
val high: HighMath | |
def squareOfSum(a: Int, b: Int) = | |
for { | |
sum <- basic.add(a, b) | |
square <- high.power(sum, 2) | |
} yield square | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment