Skip to content

Move some subset of bounded helpers to Relude proper #3

@mlms13

Description

@mlms13
  • Members of BOUNDED can always have a clamp function that enforces the top/bottom range
  • Members of BOUNDED can always have a function t => option(t) that ensures the value is in range
  • Members of BOUNDED can be wrapped forward or backward if they can be converted to/from a value that is a member of EUCLIDEAN_RING and ORD

I'm not sure how much of this is broadly useful, but it was useful for Hour, Minute, Second, etc, and it seems like it might be useful for any BOUNDED types that want to validate themselves.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions