[Haskell-cafe] Re: don't: a 'do' for comonads?

Donald Bruce Stewart dons at cse.unsw.edu.au
Thu Nov 9 22:46:52 EST 2006


apfelmus:
> Donald Bruce Stewart wrote:
> > As seen on #haskell, from an idea by Malcolm,
> > 
> >     14:42  ?let top'n'tail = ("<pre>"++) . (++"</pre>") 
> >     14:42  lambdabot> Defined.
> >     14:43  dons> > L.top'n'tail "foo me now"
> >     14:43  lambdabot>  "<pre>foo me now</pre>"
> >     14:43  mauke> that reminds me, haskell needs don't
> >     14:43  dons> yes!
> >     14:44  pkhuong-> mm. the opposite of do, eh? do for comonads? :)
> > 
> > So now a prize to the person who comes up with the best use for the
> > identifier:
> > 
> >     don't :: ?
> > 
> > -- Don
> 
> don't :: IO a -> a
> 
> example :: ()
> example = don't (do erase "/dev/hda")

I like it!

-- Don


More information about the Haskell-Cafe mailing list