Skip to content

Commit

Permalink
Update Functions and Inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
iammuhit committed Dec 26, 2020
1 parent e5b1c3d commit 8efd4b3
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 10 deletions.
10 changes: 0 additions & 10 deletions 01_-_Inputs.hs

This file was deleted.

29 changes: 29 additions & 0 deletions functions-and-inputs.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{-
displayMe x
@takes An input of any kind
@returns The value of x
@examples displayMe 3 == 3
displayMe "Haskell for Great Good!" == "Haskell for Great Good!"
-}
displayMe x = x

{-
doubleMe x
@takes A number
@returns Multiplies the number by two
@examples doubleMe 5 == 10
doubleMe 2.5 == 5.0
-}
doubleMe x = x + x

{-
doubleUs x y
@takes Two numbers
@returns Multiplies the each number by two and then adds them together
@examples doubleUs 4 5 == 18
doubleUs 2.5 3.0 == 12.0
-}
doubleUs x y = doubleMe x + doubleMe y

0 comments on commit 8efd4b3

Please sign in to comment.