[clean-list] Passing functions through command line

Willer Alves willeralves@yahoo.com.br
Fri, 25 Jan 2002 10:42:44 -0200


--=======738E43DF=======
Content-Type: multipart/alternative; x-avg-checked=avg-ok-55E457BD; boundary="=====================_4045432==_.ALT"


--=====================_4045432==_.ALT
Content-Type: text/plain; x-avg-checked=avg-ok-55E457BD; charset=us-ascii
Content-Transfer-Encoding: 8bit

I've done a simple program like this:

module test
import StdEnv

pi :== 3.14159

Start = map equation [0.0,pi/2.0,pi,3.0*pi/2.0,2.0*pi]

equation x = (sin x)+(cos x)

And obviously it's worked.
But now, I want to pass the function (for example, (sin x)+(cos x)) through the command line. So, I could apply any function in that list without recompiling the program, for example, calling that as 
\>test ((tan x)-pi)
I know that getCommandLine will return the function as a String. So, how could I handle this String to apply the function in the list?

Thank you all!

Willer Alves
Brazil


--=====================_4045432==_.ALT
Content-Type: text/html; x-avg-checked=avg-ok-55E457BD; charset=us-ascii
Content-Transfer-Encoding: 8bit

I've done a simple program like this:

module test
import StdEnv

pi :== 3.14159

Start = map equation [0.0,pi/2.0,pi,3.0*pi/2.0,2.0*pi]

equation x = (sin x)+(cos x)

And obviously it's worked.
But now, I want to pass the function (for example, (sin x)+(cos x)) through the command line. So, I could apply any function in that list without recompiling the program, for example, calling that as
\>test ((tan x)-pi)
I know that getCommandLine will return the function as a String. So, how could I handle this String to apply the function in the list?

Thank you all!

Willer Alves
Brazil
--=====================_4045432==_.ALT-- --=======738E43DF======= Content-Type: text/plain; charset=us-ascii; x-avg=cert; x-avg-checked=avg-ok-55E457BD Content-Disposition: inline --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.314 / Virus Database: 175 - Release Date: 11/01/02 --=======738E43DF=======-- _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com