_ used to match everything where you are not interested in the meaning, so it is usually used to match the “everything else” case.
In your example, the code (_, _) will match any tuple with two values ​​in it. Note that it can also be replaced with just _ , since you don't care about any value. A more obvious example would be that you need one value from the tuple, but not another, for example, the implementation of fst in the base package
fst : (a,b) -> a fst (a,_) = a
We don’t care about the second value in the tuple, so it just matches _ in that position.
Elm does not have null or undefined , so you don’t have to worry about “no value” (if something doesn’t matter, Maybe ).
source share