Maybe there's some technical reason that I've forgotten, but I think
it's just that `hash` is newer and was an experiment toward a better
interface. A `mutable-hash` function would make sense, as far as I can
tell.

Meanwhile, something like `(hash-copy (hash 'a 1 'b 2))` might be the
most convenient option right now.

At Wed, 7 Dec 2016 08:49:42 -0800, David Storrs wrote:
> -> (hash 'a 1 'b 2)
> '#hash((a . 1) (b . 2))
> 
> -> (make-hash '((a . 1) (b . 2)))
> '#hash((b . 2) (a . 1))
> 
> -> (make-hash 'a 1 'b 2)
> (make-hash 'a 1 'b 2)
> ; make-hash: arity mismatch;
> ;  the expected number of arguments does not match the given number
> ;   expected: 0 to 1
> ;   given: 4
> ; [,bt for context]
> 
> Why does 'make-hash' not work like 'hash'?  Is it possible that a flag
> could be added that would *make* it work like hash?  Or, alternatively,
> does another function exist that will create a mutable hash but will accept
> N arguments the way 'hash' does?  I understand that it's not very FP to use
> mutation but there are certain problems that are easier that way.

-- 
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