Challenge 1: A Hand-Rolled myLength — Possible Solution ==================================================================== Main.hs: myLength :: [a] -> Int myLength [] = 0 -- base case: an empty list has length 0 myLength (_:xs) = 1 + myLength xs -- recursive case: 1 for the head, plus the rest's length main :: IO () main = print (myLength [10, 20, 30, 40]) Output: 4 Explanation: myLength follows the exact base-case/recursive-case shape the chapter introduces with sumList. The base case handles the empty list directly, returning 0 with no further recursion needed. The recursive case matches any non-empty list as (_:xs) -- the underscore discards the head's actual value entirely, since myLength doesn't need to know WHAT the head is, only that there is one -- and adds 1 for it, then recurses on the tail xs. Each recursive call peels off exactly one element until the list is exhausted and the base case is finally hit. WHY THIS WORKS AS AN ANSWER ------------------------------ This reimplements a real standard-library function (length) using only the base-case/recursive-case pattern the chapter introduces, with a discard pattern used correctly since the head's value itself is never needed.