@@ -86,7 +86,7 @@ List<OUTPUT_TYPE> list_map(const List<INPUT_TYPE> &input, const TemporaryCallbac
8686// condition should return true iff the given element should call action,
8787// action should return true to continue the loop or false when done.
8888template <typename T, bool BACKWARD = false >
89- static List<intptr_t > list_forAll (
89+ static List<intptr_t > list_forEach (
9090 const dsr::List<T> &list,
9191 const TemporaryCallback<bool (intptr_t index, const T &element)> &condition,
9292 const TemporaryCallback<bool(intptr_t index, const T &element)> &action
@@ -170,7 +170,7 @@ template <typename T>
170170static inline List<intptr_t > list_findAll (const dsr::List<T> &list, const TemporaryCallback<bool (intptr_t index, const T &element)> &condition) {
171171 List<intptr_t > result;
172172 // Ascending loop
173- list_forAll <T, false >(list, condition, [&result](intptr_t index, const T &element) -> bool {
173+ list_forEach <T, false >(list, condition, [&result](intptr_t index, const T &element) -> bool {
174174 result.push (index); // Push the element's index to the list.
175175 return true ; // Keep iterating over the list.
176176 });
@@ -192,7 +192,7 @@ template <typename T>
192192static inline intptr_t list_findFirst (const dsr::List<T> &list, const TemporaryCallback<bool (intptr_t index, const T &element)> &condition) {
193193 intptr_t result = -1 ;
194194 // Ascending loop
195- list_forAll <T, false >(list, condition, [&result](intptr_t index, const T &element) -> bool {
195+ list_forEach <T, false >(list, condition, [&result](intptr_t index, const T &element) -> bool {
196196 result = index; // Take the index as the result.
197197 return false ; // We are done iterating over the list.
198198 });
@@ -214,7 +214,7 @@ template <typename T>
214214static inline intptr_t list_findLast (const dsr::List<T> &list, const TemporaryCallback<bool (intptr_t index, const T &element)> &condition) {
215215 intptr_t result = -1 ;
216216 // Descending loop
217- list_forAll <T, true >(list, condition, [&result](intptr_t index, const T &element) -> bool {
217+ list_forEach <T, true >(list, condition, [&result](intptr_t index, const T &element) -> bool {
218218 result = index; // Take the index as the result.
219219 return false ; // We are done iterating over the list.
220220 });
0 commit comments