Pattern matching on a list with at least two elements in Elm
elm
Solution
In Elm, `cons` is defined as `::` rather than `:`
See: http://library.elm-lang.org/catalog/elm-lang-Elm/0.13/List
This should do it: `(pos1::pos2::poss)`
Problem
What is wrong with the following pattern matching on a list with at least two elements `pos1` and `pos2`? ``` type Pos = (Float, Float) type Tail = [Pos] tail_cut : Float -> Tail -> Tail tail_cut _ [] = [] tail_cut _ [pos] = [pos] tail_cut cut (pos1:pos2:poss) = [] --line 91 [1 of 1] Compiling Main Parse error at (line 91, column 19): unexpected ":" expecting "::", pattern, whitespace, comma ',' or closing paren ')' ``` Note that I didn't post the body and just return an empty list in order to keep the fragment small.