Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Angelov, Georgi
cryptic-solver-haskell
Commits
7d5cd2f4
Commit
7d5cd2f4
authored
Oct 19, 2021
by
gga19
Browse files
Added split string function
parent
64cd1480
Changes
1
Hide whitespace changes
Inline
Side-by-side
Server.hs
View file @
7d5cd2f4
...
...
@@ -30,3 +30,9 @@ solveAnswers clue wordLength answers
=
solveEach
clue
wordLength
as
|
otherwise
=
head
(
solveWithAnswerReturn
(
clue
,
wordLength
)
a
)
:
solveEach
clue
wordLength
as
wordsWhen
::
(
Char
->
Bool
)
->
String
->
[
String
]
wordsWhen
p
s
=
case
dropWhile
p
s
of
""
->
[]
s'
->
w
:
wordsWhen
p
s''
where
(
w
,
s''
)
=
break
p
s'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment