Skip to content

Instantly share code, notes, and snippets.

@kolov
Last active June 14, 2018 05:01
Show Gist options
  • Save kolov/b5b68a321219452d0dd8e9b679a412d8 to your computer and use it in GitHub Desktop.
Save kolov/b5b68a321219452d0dd8e9b679a412d8 to your computer and use it in GitHub Desktop.
def volume( box: Box) = for {
width <- box.width
length <- box.length
height <- box.height
} yield width * height * length
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment