Skip to content

Add neg to negate numbers #104

Description

@71104

The unary minus operator will never be implemented because it would be ambiguous due to #92: -3, or - 3, is meant to return a function that subtracts 3 rather than the number -3.

Implement a global neg function to replace the unary minus operator:

-3     # closure
neg 3  # -3

It will not be a keyword.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions