def truthy_indicies(lhs, ctx):
"""Element T
(any) -> indicies of truthy elements
(num) -> lhs * 3
"""
if vy_type(lhs) == NUMBER_TYPE:
return lhs * 3
lhs = iterable(lhs, ctx=ctx)
@lazylist
def helper():
for i in range(len(lhs)):
if lhs[i]:
yield i
return helper()
so basically, whenever you have a generator with yield, apply the @lazylist decorator.
but that's only for once you've created a niladic helper function
Ok. I have a couple of things I want to do. @AaroneousMiller Sorry but I'm going to have to move your rickroll code as it's obfuscating everything else.
I just realised - if we go with Bubbler's idea of interpreting with RustPython, we'll have Vyxal interpreted in Python interpreted in Rust compiled to Javascript compiled to C.