License | BSD3 |
---|---|
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
AOC.Challenge.Day01
Description
Day 1. See AOC.Solver for the types used in this module!
Documentation
Arguments
:: forall n. SNatI n | |
=> Int | goal sum |
-> IntSet | set of options |
-> Maybe (Vec ('S n) Int) | resulting n items that sum to the goal |
Given a goal sum and a set of numbers to pick from, finds the n
numbers in the set that add to the goal sum. The number of items
desired is inferred from the desired length of the return type.