Pick from a list

NickGeorge's icon

This seems so simple that I'm sure there's a way to do it, but I can't find it. I want an object that takes a number and a list, and outputs the [number]element of the list. I *could* do this by having a select 0 1 2 3 4 5 object, and then just put the list elements below, but this is clumsy. How do you do this?

Thanks,
Nick

[EDIT: bah, just found zl nth. still kind of clumsy, but works. I'd want the inputs reversed, should trigger on n, and let me give it a default list]

Matthew Aidekman's icon

zl mth. is that less clumsy?

NickGeorge's icon

'sfar as I can tell, mth is identical, it just 1-indexes rather than 0-indexes

Emmanuel Jourdan's icon
NickGeorge's icon

heh, that's exactly what I want. Funny, I thought I looked at lookup and decided it wasn't what I wanted. Thanks.