From 6bef44a9c4c7730d438586c921e4433f8f3bd718 Mon Sep 17 00:00:00 2001 From: empathicqubit Date: Sun, 16 Dec 2018 07:42:08 -0800 Subject: [PATCH] Added README. Modify output of complexnums. --- complexnums/README.md | 2 ++ complexnums/src/Lib.hs | 3 ++- json-parser/README.md | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/complexnums/README.md b/complexnums/README.md index ea37648..77419f4 100644 --- a/complexnums/README.md +++ b/complexnums/README.md @@ -1 +1,3 @@ # complexnums + +Take two complex numbers of the form a+bi, then multiply them and add them. diff --git a/complexnums/src/Lib.hs b/complexnums/src/Lib.hs index d54e280..21a0a57 100644 --- a/complexnums/src/Lib.hs +++ b/complexnums/src/Lib.hs @@ -56,8 +56,9 @@ someFunc = showResults <$> firstNumber <*> secondNumber >>= putStrLn where showResults f s = [ + "Added: ", addComplex f s & show, - "\n", + "\nMultiplied: ", multiplyComplex f s & show ] & concat firstNumber = ("Enter a complex number in the form of a + bi: " & prompt(=~ complexNumber)) <&> stringToComplex diff --git a/json-parser/README.md b/json-parser/README.md index 72c1107..33c6f92 100644 --- a/json-parser/README.md +++ b/json-parser/README.md @@ -1 +1,3 @@ # json-parser + +Take a JSON document from stdin and produce an object hierarchy for it.