Last active
June 1, 2016 21:58
-
-
Save anelson/40a34045363d4577e2f0441cdfe6d0af 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
//...boilerplate | |
case class Role(policies: Option[Seq[Policy]])) | |
case class Policy(statements: Option[Seq[Statement]]) | |
case class Statement(action: String) | |
val role: Role = .... | |
/* How do I: | |
* Set Role.policies to an empty Seq iff it's None | |
* Get the first Policy in Role.policies, adding a new empty Policy if Role.policies is empty | |
* Set Policy.statements to an empty Seq iff it's None | |
* Append a new Statement to Policy.statements | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment