From 3624c712d72d246f21d4e710cec7c11e052e0326 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Tue, 9 Dec 2025 16:32:32 +0100 Subject: Add the haskell book --- Haskell-book/07/src/ArtfulDodgy.purs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Haskell-book/07/src/ArtfulDodgy.purs (limited to 'Haskell-book/07/src/ArtfulDodgy.purs') diff --git a/Haskell-book/07/src/ArtfulDodgy.purs b/Haskell-book/07/src/ArtfulDodgy.purs new file mode 100644 index 0000000..5206c8d --- /dev/null +++ b/Haskell-book/07/src/ArtfulDodgy.purs @@ -0,0 +1,13 @@ +module ArtfulDodgy where + +import Prelude + +-- Exercise 1 +dodgy :: Int -> Int -> Int +dodgy x y = x + y * 10 + +oneIsOne :: Int -> Int +oneIsOne = dodgy 1 + +oneIsTwo :: Int -> Int +oneIsTwo = (flip dodgy) 2 -- cgit v1.2.3