List element replace


    May 09 2006 | 11:03 pm
    I think I'm experiencing a brain freeze here...
    Given a list (of varying size), I want to change one of the elements.
    Linterp (from the Lobjects) allows me to grab an element, but how do I replace it?
    I'm currently using funbuff, table, multislider, and coll, all of which work, but there must be a more efficient way....

    • May 09 2006 | 11:11 pm
      substitute.
    • May 09 2006 | 11:57 pm
      maybe with zl objects?
    • May 10 2006 | 5:09 am
      I don't think I was clear enough.
      Given a list [3 5 4 8], I want to, for example, increment the 3rd element by one to get [3 5 5 8].
      Isn't there a way to do this without using a table?
    • May 10 2006 | 5:22 am
      Lobjects Lobjects Lobjects check out lpad and ladd
    • May 10 2006 | 6:57 am
      That combination does the trick.
      Thanks!
    • May 10 2006 | 7:22 am
      or try my [replacelist]
      /*j
    • May 11 2006 | 9:04 am
      Arne Eigenfeldt wrote: > Given a list [3 5 4 8], I want to, for example, increment the 3rd > element by one to get [3 5 5 8].
      completely different task than you explained in the first mail...
      use a simple unpack, pack combo, a messagebox, or more universal zl nth, (part of the zl help file copied in)
      Stefan
      -- Stefan Tiedje------------x---- --_____-----------|----------- --(_|_ ----|-----|-----()---- -- _|_)----|-----()----------- ----------()-----www.ccmix.com