Created
July 31, 2014 14:47
-
-
Save tstone/115ccd732443e7b3e252 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// long-hand boilerplate: | |
case class ExampleParams(foo: String, bar: String, baz: String) extends Params { | |
def withFoo(value: String) = this.copy(foo = value) | |
def withBar(value: String) = this.copy(bar = value) | |
def withBaz(value: String) = this.copy(baz = value) | |
} | |
// with a macro: | |
param class ExampleParams(foo: String, bar: String, baz: String) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment