Dominic Chui · Jul 14

What's the best way to structure a list of tuples for passing into a method?

Let's say I have two lists of connected data where elements of listTwo only make sense if given an item of listOne as context:

listOne = ["A", "B", "C"]

listTwo = ["x", "y", "z"]

Tuples like ("A", "y") and ("C, "x") make sense, but "A" or "x" by themselves don't. I would like to pass in a list of such tuples into a method and have it handle each tuple in the list. So what would be the best way to format them given that ObjectScript does not have specialized tuples? Would it be nested $LISTBUILD lists or something else?



0 120
Discussion (1)1
Log in or sign up to continue

in ObjectScript it might be


and you pass it by reference 
do method(.list)
and consume is using $ORDER() or $QUERY()