From 2e3a8a45381c4a4b2b2833757f32aa2a1aae540a Mon Sep 17 00:00:00 2001 From: Aaro Koivukangas Date: Mon, 22 Dec 2025 21:43:39 +0200 Subject: [PATCH] 5a ex1+2 --- exercises/Set5a.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exercises/Set5a.hs b/exercises/Set5a.hs index 29db2fd..5ba485c 100644 --- a/exercises/Set5a.hs +++ b/exercises/Set5a.hs @@ -12,7 +12,7 @@ import Mooc.Todo -- Bus, Tram and Train. -- -- The constructors don't need any fields. - +data Vehicle = Bike | Bus | Tram | Train ------------------------------------------------------------------------------ -- Ex 2: Define the type BusTicket that can represent values like these: @@ -20,6 +20,7 @@ import Mooc.Todo -- - MonthlyTicket "January" -- - MonthlyTicket "December" +data BusTicket = SingleTicket | MonthlyTicket String ------------------------------------------------------------------------------ -- Ex 3: Here's the definition for a datatype ShoppingEntry that