diff options
author | Edoardo La Greca | 2025-07-04 18:21:16 +0200 |
---|---|---|
committer | Edoardo La Greca | 2025-07-04 18:21:16 +0200 |
commit | 6933b7d48239c15715565d770662d7072a819325 (patch) | |
tree | 48f5a4c80ec72224851528f08ae64187e1594bd4 /lec03 | |
parent | 38932c677220212dffcab062fa5ec1bb51749b49 (diff) |
add notes for exercises of lecture 3
Diffstat (limited to 'lec03')
-rw-r--r-- | lec03/Golf.hs | 12 |
1 files changed, 12 insertions, 0 deletions
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: |