Readme fixes and spelling tweaks
diff --git a/README.md b/README.md
index 73429a5..8772e65 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,4 @@
-#Helper libraries for working with collections.
-
-The `collection` package contains a number of separate libraries
+Contains a number libraries
with utility functions and classes that makes working with collections easier.
## Using
@@ -8,15 +6,19 @@
The `collection` package can be imported as separate libraries, or
in totality:
- import 'package:collection/algorithms.dart';
- import 'package:collection/equality.dart';
- import 'package:collection/iterable_zip.dart';
- import 'package:collection/priority_queue.dart';
- import 'package:collection/wrappers.dart';
+```dart
+import 'package:collection/algorithms.dart';
+import 'package:collection/equality.dart';
+import 'package:collection/iterable_zip.dart';
+import 'package:collection/priority_queue.dart';
+import 'package:collection/wrappers.dart';
+```
or
- import 'package:collection/collection.dart';
+```dart
+import 'package:collection/collection.dart';
+```
## Algorithms
@@ -41,7 +43,9 @@
The library provides ways to define equalities on `Iterable`s, `List`s, `Set`s,
and `Map`s, as well as combinations of these, such as:
- const MapEquality(const IdentityEquality(), const ListEquality());
+```dart
+const MapEquality(const IdentityEquality(), const ListEquality());
+```
This equality considers maps equal if they have identical keys, and the
corresponding values are lists with equal (`operator==`) values.
@@ -54,7 +58,7 @@
## Priority Queue
-An interface and implemention of a priority queue.
+An interface and implementation of a priority queue.
## Wrappers
diff --git a/lib/equality.dart b/lib/equality.dart
index c6fdafa..5911863 100644
--- a/lib/equality.dart
+++ b/lib/equality.dart
@@ -357,7 +357,7 @@
*
* In ordered mode, lists and iterables are required to have equal elements
* in the same order. In unordered mode, the order of elements in iterables
- * and lists are not importan.
+ * and lists are not important.
*
* A list is only equal to another list, likewise for sets and maps. All other
* iterables are compared as iterables only.
diff --git a/lib/priority_queue.dart b/lib/priority_queue.dart
index efb3239..e1a0177 100644
--- a/lib/priority_queue.dart
+++ b/lib/priority_queue.dart
@@ -275,7 +275,7 @@
*/
int _locate(E object) {
if (_length == 0) return -1;
- // Count positions from one instad of zero. This gives the numbers
+ // Count positions from one instead of zero. This gives the numbers
// some nice properties. For example, all right children are odd,
// their left sibling is even, and the parent is found by shifting
// right by one.
diff --git a/lib/wrappers.dart b/lib/wrappers.dart
index 9f8b833..30c736e 100644
--- a/lib/wrappers.dart
+++ b/lib/wrappers.dart
@@ -6,8 +6,8 @@
* Delegating wrappers for [Iterable], [List], [Set], [Queue] and [Map].
*
* Also adds unmodifiable views for `Set` and `Map`, and a fixed length
- * view for `List`. The unmodifable list view from `dart:collection` is exported
- * as well, just for completeness.
+ * view for `List`. The unmodifiable list view from `dart:collection` is
+ * exported as well, just for completeness.
*/
library dart.pkg.collection.wrappers;
diff --git a/test/wrapper_test.dart b/test/wrapper_test.dart
index a3526a3..e3043a2 100644
--- a/test/wrapper_test.dart
+++ b/test/wrapper_test.dart
@@ -147,7 +147,7 @@
expect.first.equals.first;
// Default values of the Iterable interface will be added in the
// second call to firstWhere, so we must record them in our
- // expectation (which doesn't have the interface implementat or
+ // expectation (which doesn't have the interface implemented or
// its default values).
expect.firstWhere(func1, orElse: null).equals.firstWhere(func1);
expect.firstWhere(func1, orElse: func0).equals.