Re: [racket-users] Are the order of hash-keys and hash-values equivalent?

2016-12-31 Thread David Storrs
On Fri, Dec 30, 2016 at 11:52 PM, Ben Greenman wrote: > > On Fri, Dec 30, 2016 at 10:45 PM, David Storrs > wrote: >> >> >> Can I assume that the elements of keys are in the same order as are >> the elements of vals? > > > No, because `hash-keys` and `hash-values` do not specify an order. Got it.

Re: [racket-users] Are the order of hash-keys and hash-values equivalent?

2016-12-30 Thread Ben Greenman
On Fri, Dec 30, 2016 at 10:45 PM, David Storrs wrote: > > Can I assume that the elements of keys are in the same order as are > the elements of vals? No, because `hash-keys` and `hash-values` do not specify an order. Maybe you want `hash->list`, or `in-hash` ? #lang racket (define (hash-spli

[racket-users] Are the order of hash-keys and hash-values equivalent?

2016-12-30 Thread David Storrs
I feel like I've asked this before but I can't find it in either my email or the list archive. Apologies if I'm wasting electrons. (define keys (hash-keys h)) (define vals (hash-values h)) Can I assume that the elements of keys are in the same order as are the elements of vals? That is, will