Skip to content

Commit 4eef36e

Browse files
authored
squeaky-clean: Update docs (#677)
* fix incorrect use of the clojure.string namespace * fix inconsistent use of backtick admonitions * minor rephrase for better flow * use the term 'lowercase' consistently across the exercise * replace 'routine' with 'function' and remove unneeded repetition of 'clean'
1 parent 485ca04 commit 4eef36e

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

exercises/concept/squeaky-clean/.docs/hints.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ The built-in `clojure.string` library contains a [`replace`][str-replace] functi
66

77
## 2. Replace control characters with the upper case string "CTRL"
88

9-
Here we need to use the [`isISOControl`][java-ctrl] method from Java's `Character` class.
9+
You can use the [`isISOControl`][java-ctrl] method from Java's `Character` class.
1010

1111
## 3. Convert kebab-case to camelCase
1212

13-
Try separating the string on the hyphens with [`string/split`][str-split].
14-
If there are no hyphens, we need to pass the original string. You can check using [string/includes?][str-includes]. Use [string/upper-case][str-upper-case] to make the "humps" of the camel. Finally, concatenate them with [string/join][str-join].
13+
Try separating the string on the hyphens with [`split`][str-split].
14+
If it contains no hyphens, you should return it as it is. You can check this using [`includes?`][str-includes]. Use [`upper-case`][str-upper-case] to make the "humps" of the camel. Finally, concatenate them with [`join`][str-join].
1515

1616
## 4. Omit characters that are not letters
1717

18-
You can filter characters using [Character/isLetter][java-isletter] as a predicate.
18+
You can filter characters using [`Character/isLetter`][java-isletter] as a predicate.
1919

20-
## 5. Omit Greek lower case letters
20+
## 5. Omit Greek lowercase letters
2121

22-
The lower-case Greek letters are Unicode points `\u03B1` to `\u03C9`, or integer values 945 through 969.
22+
The Greek lowercase letters are Unicode points `\u03B1` to `\u03C9`, or integer values 945 through 969.
2323

2424
[str-join]: https://clojuredocs.org/clojure.string/join
2525
[str-upper-case]: https://clojuredocs.org/clojure.string/upper-case

exercises/concept/squeaky-clean/.docs/instructions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
In this exercise you will implement a partial set of utility routines
44
to help a developer clean up identifier names.
55

6-
In the 5 tasks you will gradually build up the routine `clean`.
6+
In the 5 tasks you will gradually build up the function `clean`.
77
A valid identifier comprises zero or more letters and underscores.
88

99
In all cases the input string is guaranteed to be non-nil.
10-
If an empty string is passed to the `clean` function,
10+
If an empty string is passed to the function,
1111
an empty string should be returned.
1212

13-
Note that the caller should avoid calling the routine `clean`
13+
Note that the caller should avoid calling the function
1414
with an empty identifier since such identifiers are ineffectual.
1515

1616
## 1. Replace any spaces encountered with underscores
@@ -55,7 +55,7 @@ Note: The underscores must be preserved from the previous step.
5555
;; => ""
5656
```
5757

58-
## 5. Omit Greek lower case letters
58+
## 5. Omit Greek lowercase letters
5959

6060
Modify the `clean` function to omit any Greek letters in the range 'α' to 'ω'.
6161

0 commit comments

Comments
 (0)