Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Cool use for a macro: meta for

View metafor.md

Instead of...

for 1..10 -> $i {
    for 1..^$i -> $j {
        for 1..^$j -> $k {
            ...
        }
    }
}

How about this?

meta for 1..10 -> $i, 1..^$i -> $j, 1..^$j -> $k {
    ...
}

Or, if the number of for levels might vary,

constant $LEVELS = ...;
meta for 1..10, { 1..$^previous } xx $LEVELS {
    ...
}

I have no idea if the above can be made to work, but I'm eager to find out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.