[Haskell-beginners] Re: Signatures
Ertugrul Soeylemez
es at ertes.de
Thu Jun 24 06:04:45 EDT 2010
Daniel Fischer <daniel.is.fischer at web.de> wrote:
> On Wednesday 23 June 2010 19:01:21, Colin Paul Adams wrote:
> > >>>>> "Patrick" == Patrick LeBoutillier <patrick.leboutillier at gmail.com>
> writes:
> > >>> So
> > >>>
> > >>> nightmare :: Offspring ?
> >
> > If you make
> >
> > Patrick> sex :: Partner -> IO [STD]
> >
> > Patrick> then perhaps
> >
> > Patrick> nightmare :: [STD]
> >
> > Patrick> becomes more universal...
> >
> >
> >
> > What's an STD?
>
> Sexually transmitted disease
Anyway, don't perform IO unsafely. You might regret it. Sex is another
form of -- well -- input and output.
Here are the types:
getWrongWife :: IO BadWife
sex :: F___able a => a -> IO (MVar Offspring, Set Disease)
Of course you don't get offspring, if you don't "take" it.
Greets,
Ertugrul
--
nightmare = unsafePerformIO (getWrongWife >>= sex)
http://blog.ertes.de/
More information about the Beginners
mailing list