[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: anonymous functions?
From: |
Johan Kullstam |
Subject: |
Re: anonymous functions? |
Date: |
20 Dec 2000 17:00:53 -0500 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7 |
Han-Wen Nienhuys <address@hidden> writes:
> address@hidden writes:
> > eval (["function p = my_prod(t)Ün"Ü
> > " p = f(t) * g(t);Ün"Ü
> > "endfunctionÜn"]);
> >
> > but f(t) will not be visible (see the man pages on local and global
> > variables); by default, all vars are local.
>
> As far as I can tell, the only way to do what I want involves crude
> hacks (assembling strings, and loading or evalling them). In that
> case, I'll revert to using Mathematica (sorry).
>
> > Also, you don't get an anonymous func : it's called "my_prod". (note
> > that "prod" is a builtin function). Do you usually program in perl (a
> > good language for anonymous functions)?
>
> Usually in Scheme or Python.
if you like lisp, you might want to try matlisp.
<URL:http://matlisp.sourceforge.net/>
--
J o h a n K u l l s t a m
address@hidden
Don't Fear the Penguin!
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------