From e5678725032d4ccd29ef81f44b27551a4bd909a6 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Mon, 26 Oct 2020 19:16:17 -0700 Subject: [PATCH] Add a more elegant while implementation. --- HW4Part1.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HW4Part1.hs b/HW4Part1.hs index 3c09f4c..7bf8a32 100644 --- a/HW4Part1.hs +++ b/HW4Part1.hs @@ -32,7 +32,7 @@ program = ] while :: Expr -> Prog -> Stmt -while cond body = Loop $ If cond [] [ Break ] : body +while cond body = Loop [ If cond body [ Break ] ] sumFromTo :: Int -> Int -> Prog sumFromTo f t =