Skip to content

Commit 35974f9

Browse files
author
Don
committed
also fix multiples output
1 parent ea299e2 commit 35974f9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: _generator/learn/getting-started/index.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ Now let's filter out all of those elements which do not meet the criterion. We c
131131
You can see the result by evaluating `multiples` if you like, or even check its type:
132132

133133
> multiples
134-
Cons 0 (Cons 3 (Cons 5 (Cons 6 (Cons ...
134+
(0 : 3 : 5 : 6 : 9 : 10 : 12 : 15 : 18 : 20 :
135135
> :type multiples
136136
List Int
137137

Diff for: learn/getting-started/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ <h4 id="solving-project-euler-1">Solving Project Euler #1</h4>
124124
<pre><code>&gt; multiples = filter (\n -&gt; mod n 3 == 0 || mod n 5 == 0) ns</code></pre>
125125
<p>You can see the result by evaluating <code>multiples</code> if you like, or even check its type:</p>
126126
<pre><code>&gt; multiples
127-
Cons 0 (Cons 3 (Cons 5 (Cons 6 (Cons ...
127+
(0 : 3 : 5 : 6 : 9 : 10 : 12 : 15 : 18 : 20 :
128128
&gt; :type multiples
129129
List Int</code></pre>
130130
<p>Now we need to find the sum of the <code>multiples</code> array, to complete the solution. We can use the <code>sum</code> function from the <code>Data.Foldable</code> module.</p>

0 commit comments

Comments
 (0)