cons :: Iso (a, [a]) [a]
cons = iso doCons headTail where
    doCons (x, xs) = Just (x : xs)
    headTail [] = Nothing
    headTail (x : xs) = Just (x, xs)
cons :: Iso (a, [a]) [a]
cons = iso doCons headTail where
    doCons (x, xs) = Just (x : xs)
    headTail [] = Nothing
    headTail (x : xs) = Just (x, xs)
cons = iso doCons headTail where
    doCons (x, xs) = Just (x : xs)
    headTail [] = Nothing
    headTail (x : xs) = Just (x, xs)