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

Extend Closed for negative values #8

Open
stackptr opened this issue Aug 17, 2023 · 0 comments
Open

Extend Closed for negative values #8

stackptr opened this issue Aug 17, 2023 · 0 comments

Comments

@stackptr
Copy link
Member

Closed (n :: Nat) (m :: Nat) does not allow a closed interval that includes negative numbers due to the use of Nat. There are use cases where this would be convenient, such as representing a statistical normalized output as Closed (-1) 1.

Nat could be swapped out with a different type or alternatively an additional parameter could be added to indicate a negative offset:

type IntClosed = IntClosed Nat Nat Nat

type Closed = IntClosed Nat Nat 0
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

1 participant