MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: list referencing with [[]][[]]


In article <6ten4b$3ea at smc.vnet.net>,
  Allan Hayes <hay at haystack.demon.co.uk> wrote:

> t[[1]][[2]]  is equivalent to t[[1,2]] for extraction of parts, as
> indicated by  your example.
> But for part resetting, as in your second example, it in not equivalent.
> The catch is that part resetting like
>                         a[[3]] = 7
> works only when
> 1) a is a symbol that has been assigned an expression expr with
>                         a = expr
>                         (a:= expr will not do) 2) expr has a part 3
>
> During evaluation,
>                 anotherlist[[2]][[1]] = 7
>                 (that is (anotherlist[[2]])[[1]] = 7 ) becomes
>
>                 {3,4} [[1]] = 7
> which does not meet requirment 1).
>
> Allan

Do you just know this from experimentation or is there somewhere to look
this up (and evaluation issues like this)?

--Mark.
mark.fisher at atl.frb.org

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


  • Prev by Date: resorting coordinates after the rotations
  • Next by Date: Re: Q:efficient list operation wanted
  • Previous by thread: Re: list referencing with [[]][[]]
  • Next by thread: Re: Q:efficient list operation wanted