Skip to content

Fix typo #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/modules.html
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ <h1>Modules</h1>
</pre>
<p><span class="label function">span</span> is kind of like <span class="fixed">takeWhile</span>, only it returns a pair of lists. The first list contains everything the resulting list from <span class="fixed">takeWhile</span> 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.</p>
<pre name="code" class="haskell:ghci">
ghci&gt; let (fw, rest) = span (/=' ') "This is a sentence" in "First word:" ++ fw ++ ", the rest:" ++ rest
ghci&gt; let (fw, rest) = span (/=' ') "This is a sentence" in "First word: " ++ fw ++ ", the rest:" ++ rest
"First word: This, the rest: is a sentence"
</pre>
<p>Whereas <span class="fixed">span</span> spans the list while the predicate is true, <span class="label function">break</span> breaks it when the predicate is first true. Doing <span class="fixed">break p</span> is the equivalent of doing <span class="fixed">span (not . p)</span>. </p>
Expand Down
2 changes: 1 addition & 1 deletion markdown/generated_html/modules.html
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ <h2 id="data-list">Data.List</h2>
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.</p>
<pre class="haskell:ghci"><code>ghci&gt; let (fw, rest) = span (/=&#39; &#39;) &quot;This is a sentence&quot; in &quot;First word:&quot; ++ fw ++ &quot;, the rest:&quot; ++ rest
<pre class="haskell:ghci"><code>ghci&gt; let (fw, rest) = span (/=&#39; &#39;) &quot;This is a sentence&quot; in &quot;First word: &quot; ++ fw ++ &quot;, the rest:&quot; ++ rest
&quot;First word: This, the rest: is a sentence&quot;</code></pre>
<p>Whereas <code>span</code> spans the list while the predicate is true,
<code class="label function">break</code> breaks it when the predicate
Expand Down
2 changes: 1 addition & 1 deletion markdown/source_md/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
```

Expand Down