You can do:

[1, 2, (flag ? 3 : [])]

or:

tuple(1, 2, (flag ? (3,) : ())...)

On Friday, April 25, 2014 7:35:49 PM UTC-4, andrew cooke wrote:
>
>
> really i'm asking if there's an idiomatic way to do the kind of thing you 
> do with linked lists (usually, in functional languages) in julia...
>
> On Friday, 25 April 2014 20:34:43 UTC-3, andrew cooke wrote:
>>
>> oh, cute.
>>
>> no, it's not what i was looking for, unfortunately.  i just used 1, 2 and 
>> 3 as placeholders.  they could be anything.
>>
>> thanks,
>> andrew
>>
>

Reply via email to