diff --git a/docs/modules.html b/docs/modules.html index 3cc87ed..d329102 100644 --- a/docs/modules.html +++ b/docs/modules.html @@ -187,7 +187,7 @@
span is kind of like takeWhile, only it returns a pair of lists. The first list contains everything the resulting list from takeWhile would contain if it were called with the same predicate and the same list. The second list contains the part of the list that would have been dropped.
-ghci> let (fw, rest) = span (/=' ') "This is a sentence" in "First word:" ++ fw ++ ", the rest:" ++ rest +ghci> let (fw, rest) = span (/=' ') "This is a sentence" in "First word: " ++ fw ++ ", the rest:" ++ rest "First word: This, the rest: is a sentence"
Whereas span spans the list while the predicate is true, break breaks it when the predicate is first true. Doing break p is the equivalent of doing span (not . p).
diff --git a/markdown/generated_html/modules.html b/markdown/generated_html/modules.html index ea0c021..dc3bc3d 100644 --- a/markdown/generated_html/modules.html +++ b/markdown/generated_html/modules.html @@ -285,7 +285,7 @@ghci> let (fw, rest) = span (/=' ') "This is a sentence" in "First word:" ++ fw ++ ", the rest:" ++ rest
+ghci> let (fw, rest) = span (/=' ') "This is a sentence" in "First word: " ++ fw ++ ", the rest:" ++ rest
"First word: This, the rest: is a sentence"
Whereas span
spans the list while the predicate is true,
break
breaks it when the predicate
diff --git a/markdown/source_md/modules.md b/markdown/source_md/modules.md
index afe40b9..9703d1c 100644
--- a/markdown/source_md/modules.md
+++ b/markdown/source_md/modules.md
@@ -277,7 +277,7 @@ The first list contains everything the resulting list from `takeWhile` would con
The second list contains the part of the list that would have been dropped.
```{.haskell:ghci}
-ghci> let (fw, rest) = span (/=' ') "This is a sentence" in "First word:" ++ fw ++ ", the rest:" ++ rest
+ghci> let (fw, rest) = span (/=' ') "This is a sentence" in "First word: " ++ fw ++ ", the rest:" ++ rest
"First word: This, the rest: is a sentence"
```