The mapping would transform each environment variable to some type T and create an array of T the same size as there are environment variables.
The selection method would select 0 or many environment variables and return an array containing them.
Both would use callbacks that are passed the environment variable and possibly the index and some data passed in by the user.
The mapping callback will return a value of the required type while the selection will return Boolean true to select the environment variable and false to exclude it.
Mapping and selection methods are often useful.
The mapping would transform each environment variable to some type T and create an array of T the same size as there are environment variables.
The selection method would select 0 or many environment variables and return an array containing them.
Both would use callbacks that are passed the environment variable and possibly the index and some data passed in by the user.
The mapping callback will return a value of the required type while the selection will return Boolean true to select the environment variable and false to exclude it.