Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

minor changes on readme

  • Loading branch information...
commit 42185203d5c4a58b63d70a0f557a254844eacfbf 1 parent e9ba7bd
Daniel Ribeiro authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 README.md
7 README.md
View
@@ -14,14 +14,15 @@ However, as you decompose more and more your iterations into a sequence of
[reduces](http://ruby-doc.org/core-1.8.7/classes/Enumerable.html#M001148), more commonly
you see simple blocks such as:
- collection.map { |x| x.invoke }
+
dates.select { |d| d.greater_than(old_date) }
+ collection.map { |x| x.invoke }
classes.reject { |c| c.subclasses.include?(Array) }
RubyUnderscore modify classes so that you can also use a short notation for simple closures. With such, the above examples can be written as:
-
- collection.map _.invoke
+
dates.select _.greater_than old_date
+ collection.map _.invoke
classes.reject _.subclasses.include? Array
Just replace the iterating argument with the underscore symbol (*_*), and ditch the
Please sign in to comment.
Something went wrong with that request. Please try again.