Adding comonad methods extract and extend.