Skip to content

Commit 41c4b5d

Browse files
committed
Merge pull request #28 from citizen428/chapter5
Remove unnecessary "to" Thanks for catching this!
2 parents 1df8461 + df3e506 commit 41c4b5d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

ch05-strings.asciidoc

+4-5
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ continues to work.
1717

1818
This philosophy, however, is not the one you want to employ when you
1919
have (atypical for Elixir) programs that ask for user input.
20-
You want to those to crash infrequently and catch as many input errors as possible.
20+
You want those to crash infrequently and catch as many input errors as possible.
2121

2222
In this étude, you will write a module named +ask_area+, which prompts you
2323
for a shape and its dimensions, and then returns the area by calling
@@ -74,7 +74,7 @@ program work.
7474
Given a string as a prompt, displays the string
7575
+"Enter _prompt_ > "+ and returns the number that was input.
7676
This involves the following steps:
77-
77+
7878
* Use +String.strip/1+ to get rid of the trailing newline character
7979
* Use +string_to_integer/1+ to convert the string to a number.
8080

@@ -129,7 +129,7 @@ The function you will use is the +Regex.match?/2+. It takes a regular expression
129129

130130
// [source,iex]
131131
----
132-
iex(1)> Regex.match?(~r/e/, "hello")
132+
iex(1)> Regex.match?(~r/e/, "hello")
133133
true
134134
iex(2)> Regex.match?(~r/[0-9]/, "h3llo")
135135
true
@@ -160,11 +160,10 @@ iex(2)> Dates.date_parts("2013-06-15")
160160

161161
Use the +String.split/3+ function to accomplish this task.
162162
How, you may ask, does that function work? Ask Elixir!
163-
In IEx, type +h String.split+ and you will see the online documentation for
163+
In IEx, type +h String.split+ and you will see the online documentation for
164164
that function.
165165

166166
Yes, I know this étude seems pointless, but trust me:
167167
I'm going somewhere with this. Stay tuned.
168168

169169
<<SOLUTION05-ET03,See a suggested solution in Appendix A.>>
170-

0 commit comments

Comments
 (0)