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

meteor - inserting data to database gives error "insert failed: Method '/texts/insert' not found" -

angular - DownloadURL return null in below code -