Thanks. That did the trick. Not sure it is an efficient solution, but if I was worried about efficiency, then I should be using lists anyway.

Thanks,
Chris

Raphael Collet wrote:
You have to rebuild a brand new tuple, since the input field number 2 is the output field number 1, and so on. The simplest, in my opinion, is to get the fields in a list, and rebuild a tuple from the tail of that list.

%% return tuple T without its first field, and its remaining fields
%% moved one position "to the left"
fun {Foo T}
   {List.toTuple {Label T} {Record.toList T}.2}
end

Cheers,
raph

On Fri, Oct 3, 2008 at 6:44 AM, Chris Rathman <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    What I want is take a record that has implicit indexes such as:

      a(10 20 30 40)

    and return a record with one less arity, stripping off the first
    value:

      a(20 30 40)

    I can get close with:

      {Record.filterInd a(10 20 30 40) fun {$ I X} I > 1 end}

    But that returns the value of

     a(2:20 3:30 4:40)

    which is not quite the same thing.

    Is there a way to do what I am trying to do?

    Thanks,
    Chris
    
_________________________________________________________________________________
mozart-users mailing list [email protected] <mailto:[email protected]>
    http://www.mozart-oz.org/mailman/listinfo/mozart-users


------------------------------------------------------------------------

_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to