Created
June 8, 2020 22:55
-
-
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 +…
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
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