:: x -> (x, x) package:lens

Attempt to extract the left-most element from a container, and a version of the container without that element.
>>> uncons []
Nothing
>>> uncons [a, b, c]
Just (a,[b,c])
Attempt to extract the right-most element from a container, and a version of the container without that element.
>>> unsnoc (LazyT.pack "hello!")
Just ("hello",'!')
>>> unsnoc (LazyT.pack "")
Nothing
>>> unsnoc (Seq.fromList [b,c,a])
Just (fromList [b,c],a)
>>> unsnoc (Seq.fromList [])
Nothing