Compare commits

..

5 Commits
main ... sander

Author SHA1 Message Date
Sander 01a11ad970 initial setup 2025-11-25 18:46:53 +00:00
Sander 0c3541d98a Update sander/AoC 2025 2025-11-25 18:23:13 +00:00
Sander 68d43244fd Update sander/day1 2025-11-25 17:32:48 +00:00
Sander 35df161c0c Update day1 2025-11-25 17:32:38 +00:00
Sander d5b48edffb sander 2025-11-25 16:02:23 +00:00
1 changed files with 31 additions and 0 deletions

31
sander/AoC 2025 Normal file
View File

@ -0,0 +1,31 @@
-- AOC 2025 - Sander
-- so for those wondering about how I run this Haskell code, here's the setup:
-- 1) install GHCup as instructed from https://www.haskell.org/ghcup/
-- 2) save this haskell file and your AOC input file in some directory on your computer
-- 3) rewrite the "main" function with the location of your AOC input file
-- 4) rewrite "print contents" in the "main" function to use the function(s) you've made to process the input file ("contents") from that day correctly
-- 5) run Command Prompt, go to the directory of your files (with "cd" command) and run the command "ghci AOC2025.hs"
-- 6) run command "main"
-- 7) if your functions are correct, you'll get the correct answer!
import System.IO
import Control.Monad
main :: IO()
main = do handle <- openFile "C:/Users/[your directory here]/d1.txt" ReadMode
contents <- hGetContents handle
print contents
hClose handle
-- Day 1: ...
-- Part One
doday1_1 :: String -> String
doday1_1 input = undefined
-- Part Two
doday1_2 :: String -> String
doday1_2 input = undefined