-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add some utility functions and macros from Infinitesimal Quest 2 + ε #85
Conversation
(cond | ||
(< x 0) -1 | ||
(> x 0) 1 | ||
(= x 0) 0 | ||
True (raise TypeError))") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cute
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooh I really like defmacro-kwargs
, that's very handy.
Although useful, I don't think sign
really belongs in Hyrule; it's a math utility function that doesn't provide any additional functionality for Hy-specific language items.
My intention for Hyrule was never that it be restricted to things that are Hy-specific, exactly; "missing standard functions" are a reasonable use of the library, which is why we have things like |
2c9d19a
to
2f084b7
Compare
That's why in the inclusion criteria I only said "It's of general interest to Hy programmers" instead of something like "It's of interest to Hy programmers, but not pure Python programmers". |
Hmm, I guess it's still of use if you're writing functional Python, which I can see as another use case for Hyrule. With that being the case, PR looks good to me 👍 |
No description provided.