Skip to content

Commit

Permalink
add "implement both with..." to if exercises
Browse files Browse the repository at this point in the history
  • Loading branch information
GoNZooo committed May 25, 2021
1 parent c6655e2 commit 73c5913
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions basics/01-values-and-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -464,9 +464,11 @@ action of type `IO ()` in each branch when we executed `putStrLn ...`.

### Exercises (Asking questions about values)

1. Define a function that takes two `Int`s and returns the biggest of the two.
1. Define a function that takes two `Int`s and returns the biggest of the two. Implement it both
with function guards as well as `if`.

2. Define a function that takes two `Int`s and returns the smallest of the two.
2. Define a function that takes two `Int`s and returns the smallest of the two. Implement it both
with function guards as well as `if`.

3. Define a function that subtracts an integer from another, but if the result is less than zero,
instead return `0`. Use the function you defined in exercise 1.
Expand Down

0 comments on commit 73c5913

Please sign in to comment.