From 6933b7d48239c15715565d770662d7072a819325 Mon Sep 17 00:00:00 2001 From: Edoardo La Greca Date: Fri, 4 Jul 2025 18:21:16 +0200 Subject: add notes for exercises of lecture 3 --- lec03/Golf.hs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lec03/Golf.hs b/lec03/Golf.hs index 412ab22..d2214a7 100644 --- a/lec03/Golf.hs +++ b/lec03/Golf.hs @@ -2,6 +2,18 @@ module Golf where import Data.List import Data.Maybe +-- A few notes related to the exercises of this lecture: +-- 1. All defined functions and types have explanatory comments, since they are +-- required by the assignment. +-- 2. All functions are way messier than they should be, since the assignment is +-- all about code golf (i.e. trying to write the shortest function or program +-- that can achieve a given task). +-- 3. The solutions I wrote in this file use features of the Haskell language +-- that have not been explained in lectures, yet, and I did so because no +-- rule says I can't. The features are: lambdas, where clauses, and type +-- definitions. (Did I forget some?) Also, without those features, the code +-- would have been way longer. + -- Exercise 1 -- Explanation: -- cgit v1.2.3