Skip to content

Instantly share code, notes, and snippets.

@jluismm2311
Created June 8, 2020 22:55
Show Gist options
  • Save jluismm2311/10d6c01cf3079bb98fb188e32aa972e3 to your computer and use it in GitHub Desktop.
Save jluismm2311/10d6c01cf3079bb98fb188e32aa972e3 to your computer and use it in GitHub Desktop.
The Western Suburbs Croquet Club has two categories of membership, Senior and Open. They would like your help with an application form that will tell prospective members which category they will be placed. To be a senior, a member must be at least 55 years old and have a handicap greater than 7. In this croquet club, handicaps range from -2 to +…
class Kata {
static def openOrSenior(data) {
data.collect{def values ->
values.first() >=55 && values[1] > 7? 'Senior': 'Open'
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment