From f84ddf092b4f54137a088df949c647877a528749 Mon Sep 17 00:00:00 2001 From: naskya Date: Wed, 9 Apr 2025 08:16:10 +0900 Subject: [PATCH] Fix typo --- docs/modules.html | 2 +- markdown/generated_html/modules.html | 2 +- markdown/source_md/modules.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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 @@

Modules

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 @@

Data.List

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 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" ```