github.com/m4gshm/gollections@v0.0.13-0.20240331203319-a34a86e58a24/loop/range_/api.go (about) 1 // Package range_ provides alias for the slice.Range function 2 package range_ 3 4 import ( 5 "golang.org/x/exp/constraints" 6 7 "github.com/m4gshm/gollections/loop" 8 ) 9 10 // Of - range_.Of short alias of the loop.Range 11 func Of[T constraints.Integer](from T, to T) loop.Loop[T] { 12 return loop.Range(from, to) 13 } 14 15 // Closed - range_.Closed short alias of the loop.RangeClosed 16 func Closed[T constraints.Integer](from T, to T) loop.Loop[T] { 17 return loop.RangeClosed(from, to) 18 }