Added Method #for: which is an idiomatic alias for #do:.
authorBrian T. Rice <briantrice@gmail.com>
Sun, 7 Mar 2010 19:09:26 +0000 (11:09 -0800)
committerBrian T. Rice <briantrice@gmail.com>
Sun, 7 Mar 2010 19:09:26 +0000 (11:09 -0800)
src/core/method.slate

index 2aeafff..0be2499 100644 (file)
@@ -151,6 +151,10 @@ m@(Method traits) if: boolean
 "Evaluates the block body if the given condition is True."
 [boolean ifTrue: [m do]].
 
+m@(Method traits) for: src
+"Evaluates the block for each element of the Enumerable (Collection or Stream)."
+[src do: m].
+
 count@(Integer traits) timesRepeat: block
 "Execute the block the number of times of the count, answering Nil."
 [