Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- implicit def trailingConditionals[T](any: => T) = new {
- def provided(expr: Boolean) = if (expr) Some(any) else None
- def unless(expr: Boolean) = if (!expr) Some(any) else None
- }
- implicit def verbosePlus(i: Int) = new {
- def plus(j: Int): Int = {
- println("Adding " + i + " and " + j);
- i + j
- }
- }
Add Comment
Please, Sign In to add comment