[ prog / sol / mona ]

prog


What are you working on?

72 2019-02-18 01:03

http://ix.io/1Bix

Radix-filter has two interleaved responsibilities. It produces a stream of items by filtering, and it consumes the stream with a radix builder. If you separate production and consumption, and interleave them in a function that links up a producer and a consumer, the radix building consumer becomes a fold. This can be written once and used to unify radix-filter, vector->radix and list->radix by using different producers. If you choose this path, copy-append! will also belong here by using an appending radix builder, which you already have. Then >>16 can be addressed by a generic buffering producer that wraps the real producer. The producer+consumer design can then be unified with range-extract-fold by making the fold a consumer and range-extract a producer.

199


VIP:

do not edit these