Skip to content
Merged
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 exercises/acronym/examples/success-text/src/Acronym.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ abbreviate s = T.filter (/= ' ') $ T.zipWith sanitize (" " <> s) (s <> " ")

sanitize :: Char -> Char -> Char
sanitize a b
| (a == ' ' || a == '-') && isLetter b = toUpper b
| not (isLetter a) && a /= '\'' && isLetter b = toUpper b
| isLower a && isUpper b = b
| otherwise = ' '
2 changes: 1 addition & 1 deletion exercises/acronym/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: acronym
version: 1.6.0.10
version: 1.7.0.11

dependencies:
- base
Expand Down
4 changes: 4 additions & 0 deletions exercises/acronym/test/Tests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,8 @@ cases = [ Case { description = "basic"
, input = "Halley's Comet"
, expected = "HC"
}
, Case { description = "underscore emphasis"
, input = "The Road _Not_ Taken"
, expected = "TRNT"
}
]