Skip to content

Commit 02f8a80

Browse files
committed
pythagorean-triplets: declare type and add explicit args
1 parent 8ae6163 commit 02f8a80

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
module Triplet (isPythagorean, mkTriplet, pythagoreanTriplets) where
22

3-
isPythagorean = error "You need to implement this function."
3+
isPythagorean :: (Int, Int, Int) -> Bool
4+
isPythagorean triplet = error "You need to implement this function."
45

5-
mkTriplet = error "You need to implement this function."
6+
mkTriplet :: Int -> Int -> Int -> (Int, Int, Int)
7+
mkTriplet a b c = error "You need to implement this function."
68

7-
pythagoreanTriplets = error "You need to implement this function."
9+
pythagoreanTriplets :: Int -> Int -> [(Int, Int, Int)]
10+
pythagoreanTriplets minFactor maxFactor = error "You need to implement this function."

0 commit comments

Comments
 (0)