I have been using "compose" to set variables within an array,
I have the sneaky feeling that there may be easier way.

>>data: [ [ 1 2 3 ] [ 3 4 5 ] ]
== [[1 2 3] [3 4 5]]
>> b: 2
== 2
>> c: 3
== 3
>> new-data: 777
== 777
>> do compose [ (to-set-path reduce [ 'data :a :b ])  new-data ]
== [777 4 5]
>> data
== [[1 2 3] [777 4 5]]

Anyone know of an easier way?

Mike Yaunish
[EMAIL PROTECTED]


Reply via email to