New egg: slset
Peter Bex via Chicken-users <[email protected]>
| Newsgroups | gmane.lisp.scheme.chicken |
|---|---|
| Message-ID | <aKRlECquuB4usMCs@doggett> |
Hi CHICKENeers, The past few weeks I've been obsessing about a very niche problem, triggered by some code in CHICKEN core that relied on SRFI-1's "lset" procedures which treat lists as sets, specifically when those lists contain only symbols. The SRFI-1 lset operations are all quadratic on the input (as the docs clearly state). In SRFI-1 there's a throwaway remark: "One can use algorithms based on element-marking, with linear-time results". I figured one should be able to do this by relying on symbol plists to hold such markings. The result of this is the "slset" egg - treating [S]ymbol-[L]ists as [SET]s (sorry, the name is a bit awkward). It's available for CHICKEN 5 *and* 6. See the documentation at https://wiki.call-cc.org/eggref/5/slset or https://wiki.call-cc.org/eggref/6/slset for more info. Cheers, Peter