Packages

A collection of common Search Algorithms

Current section

Files

Jump to
search_algorithms_gleam src internal utils.gleam
Raw

src/internal/utils.gleam

pub fn least_costly(left: List(#(Int, a)), right: List(#(Int, a))) -> Bool {
case left, right {
[#(cost_left, _), ..], [#(cost_right, _), ..] -> cost_right < cost_left
// logically these will never happen
[], _ -> False
_, [] -> False
}
}