racket-collections
racket-collections copied to clipboard
`has-key?` function for `indexable` interface
I'm attempting to make some lenses that view maybe
s of indexables, but there's no way to test if a key is in an indexable. I was expecting some sort of has-key?
complement to ref
, where (has-key? indexable key) => #t
implies that (ref indexable key)
won't throw. Is this something that should be part of the indexable interface?
Bluntly, yes, there’s no reason for this not to exist. Feel free to open a PR to add it.