I'm embarrassed I didn't think of it either. Just letting you know the 
embarrassment is distributed and not all on your shoulders :)

On Wednesday, October 15, 2014 9:33:21 AM UTC-6, Gray Calhoun wrote:
>
> Oh, that's embarrassingly obvious in retrospect. Thanks!
>
> On Wednesday, October 15, 2014 10:24:59 AM UTC-5, Jiahao Chen wrote:
>>
>> You can do
>>
>> v = f(1, 2, 3)[3]
>>
>> Thanks,
>>
>> Jiahao Chen
>> Staff Research Scientist
>> MIT Computer Science and Artificial Intelligence Laboratory
>>
>> On Wed, Oct 15, 2014 at 11:23 AM, Gray Calhoun <gcal...@iastate.edu> 
>> wrote:
>>
>>> Hi everyone, if a function returns multiple values, is there an 
>>> idiomatic way to discard all but (say) the 3rd value returned? For example:
>>>
>>> f(x, y, z) = return x^2, y^3, z^4
>>> _, _, v = f(1, 2, 3)
>>>
>>> expresses the intent to only use the third value returned, but surely is 
>>> inefficient.
>>>
>>> Thanks!
>>>
>>
>>

Reply via email to