Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fixes the description of foreach #83

Merged
merged 1 commit into from

2 participants

@tabdulradi

foreach is described as "mutating the collection", which is not correct as far as I know. It just executes the function on every element in the collection.

@tabdulradi tabdulradi Fixes the description of foreach
foreach was described as mutating the collection, which is not true, it just executes the function on every element in the collection.
375f788
@lahosken

Yeah, good rewording. I guess this sentence was trying to say that if you want to mutate the items, you'd be more likely to use foreach than, say, map. But that doesn't really come through.

@lahosken lahosken merged commit fda48fa into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 2, 2013
  1. @tabdulradi

    Fixes the description of foreach

    tabdulradi authored
    foreach was described as mutating the collection, which is not true, it just executes the function on every element in the collection.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  web/coll2.textile
View
2  web/coll2.textile
@@ -127,7 +127,7 @@ returns a collection with every element transformed by @f@
def foreach[U](f: Elem => U): Unit
</code>
-mutates a collection by executing @f@ over each element.
+executes @f@ over each element in a collection.
<code>
def find (p: (A) => Boolean) : Option[A]
Something went wrong with that request. Please try again.