| OLD | NEW |
| 1 #library('dom'); | 1 #library('dom'); |
| 2 | 2 |
| 3 #native('dom_frog.js'); | 3 #native('dom_frog.js'); |
| 4 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 4 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 5 // for details. All rights reserved. Use of this source code is governed by a | 5 // for details. All rights reserved. Use of this source code is governed by a |
| 6 // BSD-style license that can be found in the LICENSE file. | 6 // BSD-style license that can be found in the LICENSE file. |
| 7 | 7 |
| 8 // DO NOT EDIT | 8 // DO NOT EDIT |
| 9 // Auto-generated Dart DOM library. | 9 // Auto-generated Dart DOM library. |
| 10 | 10 |
| (...skipping 11981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11992 * writing a class that implements [Collection] and the [iterator] | 11992 * writing a class that implements [Collection] and the [iterator] |
| 11993 * method. | 11993 * method. |
| 11994 */ | 11994 */ |
| 11995 class _Collections { | 11995 class _Collections { |
| 11996 static void forEach(Iterable<Object> iterable, void f(Object o)) { | 11996 static void forEach(Iterable<Object> iterable, void f(Object o)) { |
| 11997 for (final e in iterable) { | 11997 for (final e in iterable) { |
| 11998 f(e); | 11998 f(e); |
| 11999 } | 11999 } |
| 12000 } | 12000 } |
| 12001 | 12001 |
| 12002 static List map(Iterable<Object> source, |
| 12003 List<Object> destination, |
| 12004 bool f(o)) { |
| 12005 for (final e in source) { |
| 12006 destination.add(f(e)); |
| 12007 } |
| 12008 return destination; |
| 12009 } |
| 12010 |
| 12002 static bool some(Iterable<Object> iterable, bool f(Object o)) { | 12011 static bool some(Iterable<Object> iterable, bool f(Object o)) { |
| 12003 for (final e in iterable) { | 12012 for (final e in iterable) { |
| 12004 if (f(e)) return true; | 12013 if (f(e)) return true; |
| 12005 } | 12014 } |
| 12006 return false; | 12015 return false; |
| 12007 } | 12016 } |
| 12008 | 12017 |
| 12009 static bool every(Iterable<Object> iterable, bool f(Object o)) { | 12018 static bool every(Iterable<Object> iterable, bool f(Object o)) { |
| 12010 for (final e in iterable) { | 12019 for (final e in iterable) { |
| 12011 if (!f(e)) return false; | 12020 if (!f(e)) return false; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12101 startIndex = a.length - 1; | 12110 startIndex = a.length - 1; |
| 12102 } | 12111 } |
| 12103 for (int i = startIndex; i >= 0; i--) { | 12112 for (int i = startIndex; i >= 0; i--) { |
| 12104 if (a[i] == element) { | 12113 if (a[i] == element) { |
| 12105 return i; | 12114 return i; |
| 12106 } | 12115 } |
| 12107 } | 12116 } |
| 12108 return -1; | 12117 return -1; |
| 12109 } | 12118 } |
| 12110 } | 12119 } |
| OLD | NEW |