OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library collections; | |
6 | |
7 /** | 5 /** |
8 * Returns the concatenation of the input [iterables]. | 6 * Returns the concatenation of the input [iterables]. |
9 * | 7 * |
10 * The returned iterable is a lazily-evaluated view on the input iterables. | 8 * The returned iterable is a lazily-evaluated view on the input iterables. |
11 */ | 9 */ |
12 Iterable/*<E>*/ concat/*<E>*/(Iterable<Iterable/*<E>*/ > iterables) => | 10 Iterable/*<E>*/ concat/*<E>*/(Iterable<Iterable/*<E>*/ > iterables) => |
13 iterables.expand((x) => x); | 11 iterables.expand((x) => x); |
14 | 12 |
15 /** | 13 /** |
16 * Returns the concatenation of the input [iterables] as a [List]. | 14 * Returns the concatenation of the input [iterables] as a [List]. |
(...skipping 23 matching lines...) Expand all Loading... |
40 | 38 |
41 int get hashCode => first.hashCode ^ last.hashCode; | 39 int get hashCode => first.hashCode ^ last.hashCode; |
42 | 40 |
43 bool operator ==(other) { | 41 bool operator ==(other) { |
44 if (other is! Pair) return false; | 42 if (other is! Pair) return false; |
45 return other.first == first && other.last == last; | 43 return other.first == first && other.last == last; |
46 } | 44 } |
47 | 45 |
48 String toString() => '($first, $last)'; | 46 String toString() => '($first, $last)'; |
49 } | 47 } |
OLD | NEW |