aboutsummaryrefslogtreecommitdiff
path: root/Haskell-book/05/src/Sing.purs
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2025-12-09 16:32:32 +0100
committerEugen Wissner <belka@caraus.de>2025-12-09 16:32:32 +0100
commit3624c712d72d246f21d4e710cec7c11e052e0326 (patch)
treef385cb51c72a0c5eeb2057609b75f5f8c6c4f272 /Haskell-book/05/src/Sing.purs
parentc95abc31d62e296db4f1b537e3de440dd40defd1 (diff)
downloadbook-exercises-3624c712d72d246f21d4e710cec7c11e052e0326.tar.gz
Add the haskell book
Diffstat (limited to 'Haskell-book/05/src/Sing.purs')
-rw-r--r--Haskell-book/05/src/Sing.purs14
1 files changed, 14 insertions, 0 deletions
diff --git a/Haskell-book/05/src/Sing.purs b/Haskell-book/05/src/Sing.purs
new file mode 100644
index 0000000..2ca173e
--- /dev/null
+++ b/Haskell-book/05/src/Sing.purs
@@ -0,0 +1,14 @@
+module Sing where
+
+import Prelude
+
+fstString :: String -> String
+fstString x = x <> " in the rain"
+
+sndString :: String -> String
+sndString x = x <> " over the rainbow"
+
+sing :: String
+sing = if (x > y) then fstString x else sndString y
+ where x = "Singin"
+ y = "Somewhere"