axiom-developer
[Top][All Lists]
Advanced

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

RE: [Axiom-developer] Currying and iteration


From: Page, Bill
Subject: RE: [Axiom-developer] Currying and iteration
Date: Mon, 27 Mar 2006 22:35:58 -0500

On Monday, March 27, 2006 9:57 PM Gaby wrote:
> ...
> | 
> | As discussed in section "5.4.8 for Loops" of the Axiom book, you
> | may follow the keyword 'in' only by an integer segment, stream or
> | a list, but try this:
> | 
> |  V:=vector [1,2,3]
> |  [i for i in entries V]
> | 
> | The function 'entries' returns the elements of a vector as a
> | List.
> 
> That should be seen as a "defect".  for...in should be made to
> work with sequence (whether built-in list or vectors).
> 

What is a "sequence"? As far as I know this is not defined in
Axiom. Do mean that some types should be automatically coercible
to type List? Note that:

  V:=vector [1,2,3]
  [i for i in V::List Integer]

works in the Axiom interpreter but it is not clear to me exactly
where this conversion is defined.

Regards,
Bill Page




reply via email to

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