Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
REPL> password 3 (== "password")
WriteLine "Password:"
(ReadLine (\x =>
if intToBool (prim__eqString x "password")
then WriteLine "Successful login after 1 attempt(s)." (Pure True)
else WriteLine "Login failed: 1 attempt(s)."
(WriteLine "Password:"
(ReadLine (\x =>
if intToBool (prim__eqString x "password")
then WriteLine "Successful login after 2 attempt(s)." (Pure True)
else WriteLine "Login failed: 2 attempt(s)."
(WriteLine "Password:"
(ReadLine (\x =>
if intToBool (prim__eqString x
"password")
then WriteLine "Successful login after 3 attempt(s)."
(Pure True)
else WriteLine "Login failed: 3 attempt(s)."
(Pure False))))))))) : IOSpec Bool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.