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

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -