@@ -228,3 +228,11 @@ func (s *List) Search(val interface{}) *Element {
}
return nil
+
+func (s *List) Each(call func(any) bool) {
+ for f := s.First(); f != nil; f = f.Next() {
+ if !call(f.Val()) {
+ return
+ }
+}