| OLD | NEW |
| 1 /** Misc things that were useful when porting the code from Python. */ | 1 /** Misc things that were useful when porting the code from Python. */ |
| 2 #library('utils'); | 2 #library('utils'); |
| 3 | 3 |
| 4 #import('dart:math'); | 4 #import('dart:math'); |
| 5 #import('package:unittest/unittest.dart'); | 5 #import('package:unittest/unittest.dart'); |
| 6 #import('constants.dart'); | 6 #import('constants.dart'); |
| 7 | 7 |
| 8 typedef bool Predicate(); | 8 typedef bool Predicate(); |
| 9 | 9 |
| 10 class Pair<F extends Hashable, S extends Hashable> implements Hashable { | 10 class Pair<F extends Hashable, S extends Hashable> implements Hashable { |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 return new _ReverseIterable(_list).iterator(); | 181 return new _ReverseIterable(_list).iterator(); |
| 182 } | 182 } |
| 183 } | 183 } |
| 184 | 184 |
| 185 bool hasNext() => _index > 0; | 185 bool hasNext() => _index > 0; |
| 186 next() { | 186 next() { |
| 187 if (_index == 0) throw const NoMoreElementsException(); | 187 if (_index == 0) throw const NoMoreElementsException(); |
| 188 return _list[--_index]; | 188 return _list[--_index]; |
| 189 } | 189 } |
| 190 } | 190 } |
| OLD | NEW |