Last active
April 28, 2025 18:03
-
-
Save Rudxain/c06a6800807233fe6e74f179dda750a8 to your computer and use it in GitHub Desktop.
The smallest (golfed) polymorphic factorial in JavaScript. Supports BigInts and interpolates non-integer Numbers. Doesn't support negatives or NaN. Must be prefixed by `let ` to run in strict mode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f=x=>x>1?x*f(--x):(x^=x,x**x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment