haskell - Pattern Matching Redundant -


how can make sure pattern

func (2:xs) = expression 

where 2:xs length 2 list doesn't match pattern

func (2:x:xs) = expression2 

where 2:x:xs length 3 list?

end list pattern empty brackets:

func (2:x:[]) = expression 

this ensure x single element list.


Comments

Popular posts from this blog

python - Getting ESC characters and non-printables from UDP socket / buffer -

sql - Oracle (+) operator equal number -