help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: anonymous functions?


From: Han-Wen Nienhuys
Subject: Re: anonymous functions?
Date: Wed, 20 Dec 2000 19:05:27 +0100

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.

--

Han-Wen Nienhuys   |   address@hidden    | http://www.cs.uu.nl/Šþhanwen/



-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]