Hacker News new | past | comments | ask | show | jobs | submit login

One solution would be to borrow from Perl. You make a do block that executes once unless continued, and allow conditions on break and continue:

    do:
        thing()
        thing()
        continue if condition
And you can now express "skip ahead" with a `break if X` as well.



Yes, although you don't have to be so perlish as to do the if in that order

    do:
        thing()
        thing()
        if condition:
            continue




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: