-module(internal@utils). -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]). -define(FILEPATH, "src/internal/utils.gleam"). -export([least_costly/2]). -if(?OTP_RELEASE >= 27). -define(MODULEDOC(Str), -moduledoc(Str)). -define(DOC(Str), -doc(Str)). -else. -define(MODULEDOC(Str), -compile([])). -define(DOC(Str), -compile([])). -endif. ?MODULEDOC(false). -file("src/internal/utils.gleam", 1). ?DOC(false). -spec least_costly(list({integer(), GJT}), list({integer(), GJT})) -> boolean(). least_costly(Left, Right) -> case {Left, Right} of {[{Cost_left, _} | _], [{Cost_right, _} | _]} -> Cost_right < Cost_left; {[], _} -> false; {_, []} -> false end.