On Wed, 2 Feb 2005 02:50:44 +0900, Trans <transfire / gmail.com> wrote:
> Douglas Livingstone wrote:
> > How about this:
> >
> > def fun(z)
> >    x = 1
> >    y = 2
> >
> >    # unmodified original
> >    x = x + y + z
> > end
> >
> > Then you shouldn't need to worry about rewriting as they would act
> > more like defult params.
> 
> Nice.

This isn't even what he was asking for, though.  The OP wanted a
`saved arguments' thing like currying...  hardcoding in x and y is the
same as hardcoding 1 and 2 in the q (or x in OP's one example) = x +
y+ z...

Also, I've made a few small updates to my curry file, if anyone is
interested (just default behaviors for certain methods invoked without
any information to use).

Given that the OP mentioned Haskell, I think we should all try to come
up with some language that has the wonderfulness of Haskell with the
wonderful ness of Ruby.  We could call it Rascal.  Since Haskell cats
are all about domain specific languages, we could call DSLs in Rascal
"Little Rascals"...  :-)

~Me!

-- 
There's no word in the English language for what you do to a dead
thing to make it stop chasing you.