Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Per the tin - a simple predicate for testing whether a scope contains a binding.
Decided to match the arg order to Racket's
(dict-has-key? dict key)
and Clojure's(contains? coll key)
.I'm keeping this function specific to scopes though, as opposed to Clojure's
contains?
which works against any collection type.contains?
when added will likely be specific to lists. Ifcontains?
worked against scopes it would probably not work the way you'd expect; if I want to make(map)
work on scopes it'd mean having scopes convertable to a list but that would have to be a list of pairs, not a list of keys likecontains?
would expect.