question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Set non-membership and rules excluding certain sorts?

See original GitHub issue

Is there a way to pattern match on whether an element E is definitely not in some set S? Additionally, if I have a rule: rule V:Val => OP, is there a way to apply this rule only if Val is not an instance of, say, KVar?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dwightguthcommented, May 13, 2019

You can get the domain of a map by saying keys(M) which means technically you can check whether something is in the domain of a map by saying E in keys(M), but this is rather inefficient because it has to construct an entirely new collection. For a simple membership check, we have an explicit function for this: E in_keys(M) (note the underscore instead of a space)

1reaction
dwightguthcommented, May 13, 2019

in terms of the second one, you can say requires notBool isKVar(V)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Russell's paradox - Stanford Encyclopedia of Philosophy
Also known as the Russell-Zermelo paradox, the paradox arises within naïve set theory by considering the set of all sets that are not...
Read more >
Social Clubs | Internal Revenue Service
Although they are generally exempt from tax, social clubs are subject to tax on their unrelated business income (see below), which includes ...
Read more >
26 U.S. Code § 501 - Exemption from tax on corporations ...
An organization described in subsection (c) or (d) or section 401(a) shall be exempt from taxation under this subtitle unless such exemption is...
Read more >
What is a California Nonprofit Mutual Benefit Corporation? | Nolo
California recognizes three types of nonprofit corporations: religious, ... In a nonmembership set-up, the board of directors makes those decisions (such as ...
Read more >
Final Rule: Prohibitions and Restrictions on Proprietary ...
certain restrictions in the foreign public funds exclusion to more ... limited set of covered transactions with a covered fund that the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found