I realized while working on sanctuary-list that we need not require an array of values specifically. Many algebraic data types are foldable, so in some cases the identity function should be able to serve as an extractor function.
I tried generalizing the code to avoid using toArray anywhere, but this proved impractical due to uses of Z.chain with functions that always return arrays. The solution is to compose each of the extractors with toArray, necessitating very few internal changes.
I realized while working on sanctuary-list that we need not require an array of values specifically. Many algebraic data types are foldable, so in some cases the identity function should be able to serve as an extractor function.
I tried generalizing the code to avoid using
toArray
anywhere, but this proved impractical due to uses ofZ.chain
with functions that always return arrays. The solution is to compose each of the extractors withtoArray
, necessitating very few internal changes.