From 0044d607f692dc121871887a2c7d91081197cc04 Mon Sep 17 00:00:00 2001 From: Marty Sluijtman Date: Thu, 21 Mar 2024 11:48:51 +0100 Subject: [PATCH] Now with pattern matching --- app/Main.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Main.hs b/app/Main.hs index f138ab3..75013f1 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -23,6 +23,6 @@ getCurrentWeekDay = dayOfWeek . utctDay <$> getCurrentTime main :: IO () main = do day <- getCurrentWeekDay - if day == Tuesday - then print Friet - else print =<< (randomIO :: IO Fastfood) + case day of + Tuesday -> print Friet + _ -> print =<< (randomIO :: IO Fastfood)