Last active
August 10, 2018 10:43
-
-
Save ataulm/82ab3eaf283815486d7a5d128f5746ec to your computer and use it in GitHub Desktop.
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
operator fun IceCreamTub.minus(scoops: Int): IceCreamTub { | |
if (remainingScoops == 0) { | |
throw NotEnoughIceCreamException() | |
} | |
return IceCreamTub(remainingScoops - scoops) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment