Skip to content

Commit 276f86f

Browse files
committed
luhn: add types and explicit args
1 parent e10faa9 commit 276f86f

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

exercises/luhn/src/Luhn.hs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
module Luhn (addends, checkDigit, checksum, create, isValid) where
22

3-
addends = error "You need to implement this function."
3+
addends :: Integer -> [Integer]
4+
addends n = error "You need to implement this function."
45

5-
checkDigit = error "You need to implement this function."
6+
checkDigit :: Integer -> Integer
7+
checkDigit n = error "You need to implement this function."
68

7-
checksum = error "You need to implement this function."
9+
checksum :: Integer -> Integer
10+
checksum n = error "You need to implement this function."
811

9-
create = error "You need to implement this function."
12+
create :: Integer -> Integer
13+
create n = error "You need to implement this function."
1014

11-
isValid = error "You need to implement this function."
15+
isValid :: Integer -> Bool
16+
isValid n = error "You need to implement this function."

0 commit comments

Comments
 (0)