Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

#Perl , 6 bytes

Perl , 6 bytes

perl -e '{redo}'

From perldoc -f redo:

The redo command restarts the loop block without evaluating the conditional again...Note that a block by itself is semantically identical to a loop that executes once. Thus redo inside such a block will effectively turn it into a looping construct.

I don't see redo too often in production code, but it's great for golf! Compare the above to the shortest equivalents with for, while, and goto:

for(;;){} # 9 bytes
1while 1 # 8 bytes
X:goto X # 8 bytes

#Perl , 6 bytes

perl -e '{redo}'

From perldoc -f redo:

The redo command restarts the loop block without evaluating the conditional again...Note that a block by itself is semantically identical to a loop that executes once. Thus redo inside such a block will effectively turn it into a looping construct.

I don't see redo too often in production code, but it's great for golf! Compare the above to the shortest equivalents with for, while, and goto:

for(;;){} # 9 bytes
1while 1 # 8 bytes
X:goto X # 8 bytes

Perl , 6 bytes

perl -e '{redo}'

From perldoc -f redo:

The redo command restarts the loop block without evaluating the conditional again...Note that a block by itself is semantically identical to a loop that executes once. Thus redo inside such a block will effectively turn it into a looping construct.

I don't see redo too often in production code, but it's great for golf! Compare the above to the shortest equivalents with for, while, and goto:

for(;;){} # 9 bytes
1while 1 # 8 bytes
X:goto X # 8 bytes
added 158 characters in body
Source Link

#Perl, 6 bytes

perl -e '{redo}'

I don't see redo too often in production code, but it's great for golf!

From perldoc -f redo:

The redo command restarts the loop block without evaluating the conditional again...Note that a block by itself is semantically identical to a loop that executes once. Thus redo inside such a block will effectively turn it into a looping construct.

I don't see redo too often in production code, but it's great for golf! Compare the above to the shortest equivalents with for, while, and goto:

for(;;){} # 9 bytes
1while 1 # 8 bytes
X:goto X # 8 bytes

#Perl, 6 bytes

perl -e '{redo}'

I don't see redo too often in production code, but it's great for golf!

From perldoc -f redo:

The redo command restarts the loop block without evaluating the conditional again...Note that a block by itself is semantically identical to a loop that executes once. Thus redo inside such a block will effectively turn it into a looping construct.

#Perl, 6 bytes

perl -e '{redo}'

From perldoc -f redo:

The redo command restarts the loop block without evaluating the conditional again...Note that a block by itself is semantically identical to a loop that executes once. Thus redo inside such a block will effectively turn it into a looping construct.

I don't see redo too often in production code, but it's great for golf! Compare the above to the shortest equivalents with for, while, and goto:

for(;;){} # 9 bytes
1while 1 # 8 bytes
X:goto X # 8 bytes
Source Link

#Perl, 6 bytes

perl -e '{redo}'

I don't see redo too often in production code, but it's great for golf!

From perldoc -f redo:

The redo command restarts the loop block without evaluating the conditional again...Note that a block by itself is semantically identical to a loop that executes once. Thus redo inside such a block will effectively turn it into a looping construct.

AltStyle によって変換されたページ (->オリジナル) /