Sha256: 94d855c5371d900b703cd44d3b68f4fcc35a6dced1c49da1043afa8c521de429
Contents?: true
Size: 576 Bytes
Versions: 226
Compression:
Stored size: 576 Bytes
Contents
package strain type Ints []int func (s Ints) Keep(f func(int) bool) (r Ints) { for _, e := range s { if f(e) { r = append(r, e) } } return } func (s Ints) Discard(f func(int) bool) (r Ints) { for _, e := range s { if !f(e) { r = append(r, e) } } return } type Strings []string func (s Strings) Keep(f func(string) bool) (r Strings) { for _, e := range s { if f(e) { r = append(r, e) } } return } type Lists [][]int func (s Lists) Keep(f func([]int) bool) (r Lists) { for _, e := range s { if f(e) { r = append(r, e) } } return }
Version data entries
226 entries across 226 versions & 1 rubygems