Phil Carmody on Fri, 08 Mar 2013 11:03:56 +0100


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

Re: PARI 2.6 syntax 2: [f(x)|x<-a,b(x)]


--- On Fri, 3/8/13, Andreas Enge <andreas.enge@inria.fr> wrote:
> On Fri, Mar 08, 2013 at 08:01:25AM +0100, Pascal Molin wrote:
> > Well @ is still available, no ? The email analogy is OK : "in the following
> > domain"
> 
> Magma uses the keyword "in", which is quite reasonable.

If we're brainstorming, \in springs to mind.

If we're on the topic of that operator, is there any reason it doesn't act as a predicate?

? excludes=[2,3,5]
%1 = [2, 3, 5]
? [x^2|x <- [1..100],!x <- excludes]
  ***   at top-level: [x^2|x<-[1..100],!x<-excludes]
  ***                                    ^-----------
  *** _<_: forbidden comparison t_INT , t_VEC (3 elts).
  ***   Break loop: type 'break' to go back to GP prompt


Phil
-- 
()  ASCII ribbon campaign      ()    Hopeless ribbon campaign
/\    against HTML mail        /\  against gratuitous bloodshed

[stolen with permission from Daniel B. Cristofani]