How would we test for a range type?
Like is_range
? or equivalent?
How would we test for a range type?
Like is_range
? or equivalent?
There’s no need for such function as we can pattern match on %Range{}
struct in case
, function heads etc, and if you still need it, it’s trivial to implement.
As far as I remember we are even able to match on ..
, such that the following should work:
def range?(_.._) -> true
def range?(_) -> false