There is no specific guard for a Range per se. But depending on your code, you can either Range.to_list(0..3//1) at your calling site, or
def list_processing_function(range) when is_struct(range, Range) do
range
|> Range.to_list()
|> list_processing_function()
end
def list_processing_function(list) when is_list(list) do
...
end


















