Permalink
Browse files

updated documentation

  • Loading branch information...
1 parent fca2ece commit 9e751f8a047c098b159c13783cb84e6b6a4123e4 @ms-ati committed Apr 29, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 README.rdoc
View
@@ -83,7 +83,12 @@ Note:
find_person("John").lift_to_a +
find_person("Jill").lift_to_a +
find_person("Joan").lift_to_a).right.map { |*names| names.join(" and ") }
- # => Left("No such person: Jill", "No such person: Joan")
+ # => Left(["No such person: Jill", "No such person: Joan"])
+
+ # equivalent to the previous example, but shorter:
+ %w(Jack John Jill Joan).map { |nm| find_person(nm).lift_to_a }.inject(:+).
+ right.map { |*names| names.join(" and ") }
+ # => Left(["No such person: Jill", "No such person: Joan"])
(_more_ _examples_ _coming_ _soon_...)

0 comments on commit 9e751f8

Please sign in to comment.