Created
December 2, 2018 11:55
-
-
Save applePrincess/419b36cd7a6c49f88cd6425149b2f5f9 to your computer and use it in GitHub Desktop.
My solution to https://adventofcode.com/2018
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE TypeApplications #-} | |
module Day1 (main) where | |
import qualified Data.Text as T | |
import qualified Data.Text.IO as TIO | |
main = TIO.interact (T.pack . solve . T.splitOn "," . T.replace "+" " ") | |
where solve = show . sum . map (read @Int . T.unpack) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment