Use function composition to define the grouped samples below. We’ve given you the solution for the first sample, to get you started.
Assume that the following helper functions are defined exactly the way they are in the Grouped Samples Starter File: is-old
, is-young
, is-cat
, is-dog
, is-female
, is-fixed
, and name-has-s
.
Subset | The code to define that subset | |
---|---|---|
1 |
Kittens |
|
2 |
Puppies |
|
3 |
Fixed Cats |
|
4 |
Cats with “s” in their name |
|
5 |
Old Dogs |
|
6 |
Fixed Animals |
|
7 |
Old Female Cats |
|
8 |
Fixed Kittens |
|
9 |
Fixed Female Dogs |
|
10 |
Old Fixed Female Cats |
These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, 1738598, 2031479, and 1501927). Bootstrap by the Bootstrap Community is licensed under a Creative Commons 4.0 Unported License. This license does not grant permission to run training or professional development. Offering training or professional development with materials substantially derived from Bootstrap must be approved in writing by a Bootstrap Director. Permissions beyond the scope of this license, such as to run training, may be available by contacting contact@BootstrapWorld.org.