axiom-math
[Top][All Lists]
Advanced

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

[Axiom-math] Re: [open-axiom-devel] [fricas-devel] Re: [fricas-devel] Re


From: Francois Maltey
Subject: [Axiom-math] Re: [open-axiom-devel] [fricas-devel] Re: [fricas-devel] Re: iterators and cartesian product.
Date: 31 Oct 2007 19:23:44 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Hello,

> > > The main issue has to do with programming style. The for-loop is a
> > > construction from imperative-style programming. Operations like
> > > 'product' above operate directly on functions and return functions.
> > > This is most common in a functional-programming style and might be
> > > used for example in conjuction with another operation such as 'map' to
> > > produce the same results a a for-loop constrcut:

> map(product(Float,wholePart,sin),[1.1,2.2,3.3])
> versus
> [makeprod(wholePart x, sin x)$Product(Integer,Float) for x in [1.1,2.2,3.3]]

And what do you think about a map as :

map (t +-> [|wholePart t, sin t|], [1.1,2.2,3.3])

where [|....|] creates a makeprod with right types.

It's a good thing that record will remain mutable and the other
structure product won't be mutable. So there is no ambiguity.

Have a nice day !

F. the naive guy.




reply via email to

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