Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add (binds? scope sym) #206

Merged
merged 2 commits into from
Jul 4, 2022
Merged

add (binds? scope sym) #206

merged 2 commits into from
Jul 4, 2022

Conversation

vito
Copy link
Owner

@vito vito commented Jul 4, 2022

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. If contains? 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 like contains? would expect.

@vito vito added the enhancement New feature or request label Jul 4, 2022
these fail when the machine is under load
@vito vito merged commit 7f694bb into main Jul 4, 2022
@vito vito deleted the add-binds-pred branch July 4, 2022 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant