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

angular - DownloadURL return null in below code -

python 2.7 - Given three nested dictionaries, sort the top two nested dictionaries from a value in the innermost dictionary? -