Hacker News new | ask | show | jobs
by WildUtah 5907 days ago
How does that work? Scheme vectors are all about mutable state and a lot of the list functions are, too. Did you get a better Scheme collections library than the rest of us?
1 comments

As you have said, it is practically impossible to use vectors without mutating their contents with (vector-set! ...), but purely list-based Scheme is actually quite easy to write without resorting to some variant of (set! ...). When practicing on the early problems on Project Euler, vectors and mutation were language features I simply didn't need for some time, so I didn't learn them until later. The building and traversal of lists through recursion got me at least 80% of most problems I solved. Maybe the standard Scheme libraries just do a good job of making mutation operations look like something one needs to avoid whenever possible.