Hacker News new | ask | show | jobs
by soegaard 6 days ago
> I LOATHE the fact that you traverse lists and vectors in completely different ways

In Racket:

    (for ([x xs]) (displayln x))
This works for `xs` being a sequence, which includes lists and vectors.

Making the type explicit generates faster code:

    (for ([x (in-list   xs)]) (displayln x))
    (for ([x (in-vector xs)]) (displayln x))
1 comments

Yes, this is the kind of thing why I like Racket and Clojure and so much of the Lisperati don't.