simple list comparison

    Jun 01 2012 | 10:38 pm
    How would i do this? If int (x) is equal to an item of the list. Output (x). If int (x) is not equal to an item of the list. Output (x)+1
    It seems zl object doesn't have a mode that supports this?? Please save my headache! Thanks!

    • Jun 01 2012 | 11:54 pm
      this is all I could come up with-- it works but there may well be a 'cleverer' way:
    • Jun 02 2012 | 7:39 am
      you can also use vexpr for that kind of thing :
    • Jun 02 2012 | 9:53 am
      Regarding the question "is x element of list?" I find [zl sub] well suited.
    • Jun 02 2012 | 10:25 am
      Damn, 5 different ways to do this and I couldn't think of even one of them? I think you can tell I am more of a musician then a programmer.. Thanks a lot for the help, 'brocs' example looks like the least long-winded. I will go with that one.