diff options
author | Tomasz Chojnacki <tomaszchojnacki2001@gmail.com> | 2023-02-22 13:34:58 +0100 |
---|---|---|
committer | Tomasz Chojnacki <tomaszchojnacki2001@gmail.com> | 2023-02-22 13:34:58 +0100 |
commit | 5746dbca0ddaef455b6f26fba3945f3533d0b2c1 (patch) | |
tree | 855e48c9d25a0136351947dfe17140d40568e8fd /aoc-2020-gleam/src/days/day01.gleam | |
parent | ed0763c9dce58a53715415f31146b6f670519d76 (diff) | |
download | gleam_aoc2020-5746dbca0ddaef455b6f26fba3945f3533d0b2c1.tar.gz gleam_aoc2020-5746dbca0ddaef455b6f26fba3945f3533d0b2c1.zip |
Add aliases to long imports
Diffstat (limited to 'aoc-2020-gleam/src/days/day01.gleam')
-rw-r--r-- | aoc-2020-gleam/src/days/day01.gleam | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/aoc-2020-gleam/src/days/day01.gleam b/aoc-2020-gleam/src/days/day01.gleam index ac46581..0d2a994 100644 --- a/aoc-2020-gleam/src/days/day01.gleam +++ b/aoc-2020-gleam/src/days/day01.gleam @@ -1,16 +1,16 @@ import gleam/io import gleam/int import gleam/list -import gleam/result -import ext/resultx +import gleam/result as res +import ext/resultx as resx import util/input_util fn solve(numbers: List(Int), n: Int) -> Int { numbers |> list.combinations(by: n) |> list.find(one_that: fn(p) { int.sum(p) == 2020 }) - |> result.map(with: int.product) - |> resultx.force_unwrap + |> res.map(with: int.product) + |> resx.assert_unwrap } fn part1(numbers: List(Int)) -> Int { |