A question about monads

Georg Martius mai99dgf at studserv.uni-leipzig.de
Tue Nov 11 09:59:38 EST 2003


Hi,

just use the "<-" in the Monad like

> ... do
> 	t <- f -- where f has the type IO(Something)
> 	-- use t which is of type Something
> 	...
> 	return t  -- makes an IO(Something)

Btw: This thread might fit better to the haskell-cafe list.

Georg

On Tue, 11 Nov 2003 00:37:54 -0800, Ryoko Nanase <nptg400 at hotmail.com> 
wrote:

> Hello, everyone.
>
> I learned 'return' function which makes any type t to IO t. Is there any 
> way to
> makes any IO t to type t? I want that method because I need only the 
> value of
> input, without printing any output. You might tell me another way to do 
> it if
> the transformation of "IO t" into "t" is not required. Thanks in advance.
>
> Peace,
>
> Jason
>
> Customize MSN Messenger with backgrounds, emoticons and more.
>
> _______________________________________________
>
> Haskell  mailing  list
>
> Haskell at haskell.org
>
> http://www.haskell.org/mailman/listinfo/haskell




More information about the Haskell mailing list