On Fri, Dec 11, 2015 at 1:53 PM, Matthew Butterick <chronf...@gmail.com>
wrote:

> PS. I'm assuming that you're using `eq?` here in deliberate preference to
> `equal?`. Because `eq?` is not reliable for string comparisons.
>

Ah.  No, I did not realize that.  I thought that Racket worked on a
flyweight pattern where all strings of the same characters were eq?  --
isn't that what interned symbols are about?


>
> > > #lang racket
> > > (require rackunit)
> > > (define (foo-3 x) (if (eq? x "foo") (list #t) empty))
> > > (check-equal? (append-map foo-3 '(a b "foo" "bar")) '(#t))
> >
> >
> > That was exactly what I wanted!  Thank you very much.  Also, I hadn't
> yet discovered "append-map", so that's another thank you.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to