range: implements `hash` method on ranges