Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Monads in Scheme?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Brian McNamara!  
View profile  
 More options Feb 17 2004, 5:40 pm
Newsgroups: comp.lang.functional
From: gt51...@prism.gatech.edu (Brian McNamara!)
Date: Tue, 17 Feb 2004 22:35:20 +0000 (UTC)
Local: Tues, Feb 17 2004 5:35 pm
Subject: Re: Monads in Scheme?
gNOSPA...@jpl.nasa.gov (Erann Gat) once said:

>My question is: is it possible to render and/or explain the concept of a
>monad in Scheme?  And if not, why not?  Is it because Scheme has no type
>system, and types are part and parcel of what monads are?  Or can the
>essence of monads be divorced from type theory?

You can do it; see for example
   http://www.cs.indiana.edu/~jsobel/Parsing/explicit.html
which discusses a particular instance of using monads (for parsing) in
Scheme.

I think maybe the "main issue" you have to deal with when translating
monads to a dynamically-type language is that, in order to write
"generic" functions which work for multiple monads, you need to provide
a way to dispatch to the particular monad you're in.  That is, whereas
a Haskell function might just mention "return" and ">>=" and use the
type inferencer to resolve the overloading, in a dynamically-typed
language, you'd probably have to make all the "(Monad m)=>" functions
take an extra parameter (the dictionary of monad methods).

Note that this issue is not dealt with in the paper at the URL above;
in much of the expository writing on monads, the writer either (1)
assumes you will only be working in one monad (as above), or (2)
provides differently-named operations for each monad (e.g. unitA/bindA
for monad A, unitB/bindB for monad B, etc.).

That's my take, anyway; I don't use dynamically-typed languages very
often, so I may be off.

--
 Brian M. McNamara   lor...@acm.org  :  I am a parsing fool!
   ** Reduce - Reuse - Recycle **    :  (Where's my medication? ;) )


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.