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

Additional Patterns for case #12

Open
lavirlifiliol opened this issue Dec 26, 2020 · 1 comment
Open

Additional Patterns for case #12

lavirlifiliol opened this issue Dec 26, 2020 · 1 comment

Comments

@lavirlifiliol
Copy link
Contributor

lavirlifiliol commented Dec 26, 2020

As the language is dynamically typed, some way to check the type of values would be useful. I suggest using names of the types starting with uppercase letters

{(Int) {'a number'}
 (Str) {'a string'}
 (Tuple) {'some tuple'}
 (Atom) {'some atom'}
 (Fun) {'a function'}
}case

Another useful feature would be

{(5..^9) {'between 5 and 9 excluding 9'}
 (9..15) {'between 9 and 15, including 15'
# should also support fractions
 (1/4..5/4) {'both bounds are inclusive'}
 }case
@decorator-factory
Copy link
Collaborator

Other useful pattern types would be union pattern and intersection pattern:
e.g. (| (a b) (a _ b)) means either (a b) or (a _ b)
and e.g. (& (Int Str) (a b)) means: (a b), where a is Int and b is Str

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants