Re: [racket-users] Re: srfi-171 transducers for racket

2019-12-10 Thread Linus Björnstam
For racket it does not work out of the box, but for scheme srfi69 allows for arbitrary equality predicates and specialized hash functions. I believe r6rs hashtables has a string-CI-hash, but I can be wrong. For the racket port I removed that functionality, since I couldn't do it easily using

Re: [racket-users] Re: srfi-171 transducers for racket

2019-12-10 Thread Jack Firth
> > The "tdelete-duplicates" uses a hash-table to store already seen elements: > if the element is in the hash table, just filter it out. If it is not, we > do: (hash-set! already-seen element #t). That should be constant timeish. > I understand how that works for the usual eq? / eqv? /

Re: [racket-users] Re: srfi-171 transducers for racket

2019-12-10 Thread Linus Björnstam
Hi Jack! The "tdelete-duplicates" uses a hash-table to store already seen elements: if the element is in the hash table, just filter it out. If it is not, we do: (hash-set! already-seen element #t). That should be constant timeish. This means that you cannot (and should not) use the same

[racket-users] Re: srfi-171 transducers for racket

2019-12-10 Thread Jack Firth
This is great! Thank you for your work on this srfi. Transducers are relatively new to Racket's ecosystem and I'm happy to see more of the design space being explored. The documentation in the SRFI document still holds with some small caveats: > bytevector-u8-reduce/transduce is now