Add an alternative implementation for function `range`.