[Haskell-cafe] Info about List with terminal element

Tom Ellis tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk
Thu Nov 26 21:27:30 UTC 2015

On Thu, Nov 26, 2015 at 04:47:51PM +0100, Silvio Frischknecht wrote:
> >> data List t e = Cons e (List t e) | Null t
> > 
> > I think this is isomorphic to
> > 
> >     Producer e Identity r
> Interesting. It does appear to be very similar.
> Except that the Monad/Functor variable is 'r' not 'e'

Yes, I should have said isomorphic to 

    Producer e Identity t

The type parameters get arranged differently, so they will interact in
different ways with the standard typeclasses, but morally I think they are
the same.


More information about the Haskell-Cafe mailing list