Added README. Modify output of complexnums.

This commit is contained in:
empathicqubit 2018-12-16 07:42:08 -08:00
parent 9e9e083bdc
commit 6bef44a9c4
3 changed files with 6 additions and 1 deletions

View file

@ -1 +1,3 @@
# complexnums # complexnums
Take two complex numbers of the form a+bi, then multiply them and add them.

View file

@ -56,8 +56,9 @@ someFunc = showResults <$> firstNumber <*> secondNumber >>= putStrLn
where where
showResults f s = showResults f s =
[ [
"Added: ",
addComplex f s & show, addComplex f s & show,
"\n", "\nMultiplied: ",
multiplyComplex f s & show multiplyComplex f s & show
] & concat ] & concat
firstNumber = ("Enter a complex number in the form of a + bi: " & prompt(=~ complexNumber)) <&> stringToComplex firstNumber = ("Enter a complex number in the form of a + bi: " & prompt(=~ complexNumber)) <&> stringToComplex

View file

@ -1 +1,3 @@
# json-parser # json-parser
Take a JSON document from stdin and produce an object hierarchy for it.