From df8bd3290fd73ab8ff134980a643c5e8061b0fe0 Mon Sep 17 00:00:00 2001 From: wi11-holdsworth <83637728+wi11-holdsworth@users.noreply.github.com> Date: Wed, 1 Oct 2025 14:22:55 +1000 Subject: [PATCH] docs: format section comments nicely --- Proj2.hs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/Proj2.hs b/Proj2.hs index 143b9fa..be1635b 100644 --- a/Proj2.hs +++ b/Proj2.hs @@ -52,7 +52,7 @@ import Data.List import Data.Set qualified as S import Debug.Trace --- datatypes -- +-- ==== DATA STRUCTURES ======================================================= type GameState = [[Pitch]] @@ -75,10 +75,7 @@ instance Show Octave where instance Show Pitch where show (Pitch note octave) = show note ++ show octave - --- - --- required functions -- +-- ==== REQUIRED FUNCTIONS ==================================================== toPitch :: String -> Maybe Pitch toPitch [note, octave] = Pitch <$> charToNote note <*> charToOctave octave @@ -136,9 +133,8 @@ initialGuess = (chord, chords) nextGuess :: ([Pitch], GameState) -> (Int, Int, Int) -> ([Pitch], GameState) nextGuess (prevGuess, chord : chords) _ = (chord, chords) --- +-- ==== HELPER FUNCTIONS ====================================================== --- helper functions -- allChords :: [[Pitch]] allChords = @@ -170,5 +166,3 @@ matches xs ys = maximum permutationMatches where permutationMatches = map (pairwiseMatches xs) (permutations ys) pairwiseMatches xs ys = length $ filter (uncurry (==)) $ zip xs ys - ---