diff options
| author | Eugen Wissner <belka@caraus.de> | 2025-12-09 16:32:32 +0100 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2025-12-09 16:32:32 +0100 |
| commit | 3624c712d72d246f21d4e710cec7c11e052e0326 (patch) | |
| tree | f385cb51c72a0c5eeb2057609b75f5f8c6c4f272 /Haskell-book/07/src/ArtfulDodgy.purs | |
| parent | c95abc31d62e296db4f1b537e3de440dd40defd1 (diff) | |
| download | book-exercises-3624c712d72d246f21d4e710cec7c11e052e0326.tar.gz | |
Add the haskell book
Diffstat (limited to 'Haskell-book/07/src/ArtfulDodgy.purs')
| -rw-r--r-- | Haskell-book/07/src/ArtfulDodgy.purs | 13 |
1 files changed, 13 insertions, 0 deletions
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 |
