Comonad instance for Shared
Fix doctests