Skip to content

Latest commit

 

History

History

part1

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Advent of Code 2022 - Day 2 Part 1

What would your total score be if everything goes exactly according to your strategy guide?

Setup

Just needed to add trim: true to the split to avoid getting an empty line at the end.

Implementation

  • module attr map of scores for X, Y, and Z
  • iterate lines, splitting and scoring, then sum

Running

mix run

Testing

mix test