Something like "do" in python?
Posted: Wed Sep 21, 2022 7:39 pm
I find livecode's "do" command something like magic.
Is there something like it in Python, or JavaScript?
Is there something like it in Python, or JavaScript?
Questions and answers about the LiveCode platform.
https://www.forums.livecode.com/
Code: Select all
sort lines of myHugeList by word 3 of each & item 5 of each
Actually repeat for each is a common pattern across several languages... (and until we get compiled scripts, all of these are faster...)dunbarx wrote: ↑Wed Sep 21, 2022 9:29 pmStam.
And FAST, if you mean in the "Repeat for each..." form.
But just as cool is the "each" local variable, which allows one to, say:Magic, as you say.Code: Select all
sort lines of myHugeList by word 3 and item 5 of each
![]()
Craig
Code: Select all
filter elements of tArray where each["someKey"] = "xyz"
Code: Select all
eval()