Skip to content

Latest commit

 

History

History
12 lines (7 loc) · 1.54 KB

File metadata and controls

12 lines (7 loc) · 1.54 KB

Integers Comparator extreme #template-literal #math

by Pig Fang @g-plane

Take the Challenge

Implement a type-level integers comparator. We've provided an enum for indicating the comparison result, like this:

  • If a is greater than b, type should be Comparison.Greater.
  • If a and b are equal, type should be Comparison.Equal.
  • If a is lower than b, type should be Comparison.Lower.

Note that a and b can be positive integers or negative integers or zero, even one is positive while another one is negative.


Back Share your Solutions Check out Solutions