Added the mandatory excercise to the repository

main
Erenando 2022-11-07 09:17:28 +01:00
parent 34adba4049
commit 4444a5125c
1 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,43 @@
type alias Day =
Int
type alias Month =
Int
type alias Year =
Int
type alias Date =
( Day, Month, Year )
-- 1 Punkt:
year : Date -> Year
--year (a, b, c) = c
month : Date -> Month
--month (a,b,c) = b
day : Date -> Day
--day (a,b , c) = a
-- 1 Punkt:
lt : Date -> Date -> Bool
eq : Date -> Date -> Bool
gt : Date -> Date -> Bool
-- 1 Punkt:
toString : Date -> String
-- 2 Punkte:
next : Date -> Date
-- 2 Punkte:
prev : Date -> Date
-- 1 Punkt:
leapyear : Year -> Bool
-- 2 Punkte
sub : Date -> Date -> Int