Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Software
Mock
Commits
bb6620fe
Commit
bb6620fe
authored
Nov 15, 2018
by
Nicolas Lenz
Browse files
Add put functions for ease of use
parent
d7cedefd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Mock.hs
View file @
bb6620fe
...
...
@@ -18,3 +18,9 @@ mockRandom :: String -> IO String
mockRandom
str
=
do
time
<-
fmap
round
getPOSIXTime
return
$
toUpperBy
str
$
randoms
$
mkStdGen
time
putMockAlternate
::
String
->
IO
()
putMockAlternate
=
putStrLn
.
mockAlternate
putMockRandom
::
String
->
IO
()
putMockRandom
str
=
mockRandom
str
>>=
putStrLn
README.md
View file @
bb6620fe
...
...
@@ -3,9 +3,9 @@
GrEAt HAskeLL SCriPt to trANsForm tEXT inTo mockinG cASe
```
ghci>
m
ockRandom "Ich mag Kääääsebrot"
>>= putStrLn
ghci>
putM
ockRandom "Ich mag Kääääsebrot"
IcH mAg KÄääÄSEBroT
ghci> put
StrLn $ m
ockAlternate "Ich mag Kääääsebrot"
ghci> put
M
ockAlternate "Ich mag Kääääsebrot"
ICh mAg KÄäÄäSeBrOt
```
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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