From 5746dbca0ddaef455b6f26fba3945f3533d0b2c1 Mon Sep 17 00:00:00 2001 From: Tomasz Chojnacki Date: Wed, 22 Feb 2023 13:34:58 +0100 Subject: Add aliases to long imports --- aoc-2020-gleam/src/days/day01.gleam | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'aoc-2020-gleam/src/days/day01.gleam') 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 { -- cgit v1.2.3