The choices and sample functions currently take in NonEmptyList,
and result in RVar[Option[List]] as the final result. Because the
number of items to sample is provided as a positive integer, the
number may be larger or smaller than the input structure (the result is
a List).
Some uses have appeared where the user has a List structure and not
a NonEmptyList - base don the internal operation of the function,
this will not be problematic so a nicer alternative is to allow all
Foldable structures. Both NonEmptyList and List fulfil this
constraint and are now usable with the function.
The
choices
andsample
functions currently take inNonEmptyList
, and result inRVar[Option[List]]
as the final result. Because the number of items to sample is provided as a positive integer, the number may be larger or smaller than the input structure (the result is aList
).Some uses have appeared where the user has a
List
structure and not aNonEmptyList
- base don the internal operation of the function, this will not be problematic so a nicer alternative is to allow allFoldable
structures. BothNonEmptyList
andList
fulfil this constraint and are now usable with the function.