map' :: (ViewL a as, Cons b bs) => (a -> b) -> as -> bs map' f (viewL -> x :< xs) = f x <: map' f xs map' f (viewL -> NoViewL = error "attempt to map' a finite structure" map' :: (ViewL a as, Cons b bs) => (a -> b) -> as -> bs map' f (x :< xs) = f x <: map' f xs map' f NoViewL = error "attempt to map' a finite structure"