Skip to content

Instantly share code, notes, and snippets.

@zootella
Created February 29, 2016 00:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zootella/76d09ad23237c9be6909 to your computer and use it in GitHub Desktop.
Save zootella/76d09ad23237c9be6909 to your computer and use it in GitHub Desktop.
//1. native operators, best looking but depends on primitive types or operator overloading
if (1 + 5 - 2 <= 9) return;
//2. methods, correct java-inspired design employed by most modules
if (int(1).add(5).subtract(2).lessThanOrEqualTo(9)) return;
//3. first custom design, works alongside 2
if (int(1)._("+", 5)._("-", 2)._("<=", 9)) return;
//4. current design, replaces others
if (int(1, "+", 5, "-", 2, "<=", 9)) return;
@zootella
Copy link
Author

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