[Haskell-beginners] Actions v. Functions

Heinrich Apfelmus apfelmus at quantentunnel.de
Sun Oct 20 10:16:24 UTC 2013


Rein Henrichs wrote:
> An action in this sense is just a function of type `Monad m => a -> m b'
> (or one where the monad is specified, like `a -> IO b'). This type
> signature fully specifies the "formal properties" of an action and shows
> that actions do not differ from functions: they are merely functions of a
> certain type.

I generally use the word "action" to refer to values of type `IO a` (or 
another monad). A value of type `a -> IO b` would be a function that 
returns an action.


Best regards,
Heinrich Apfelmus

--
http://apfelmus.nfshost.com



More information about the Beginners mailing list