Skip to content

Commit 3b73256

Browse files
authored
move Python & Raku code apart, state the language for each
1 parent 1de6d36 commit 3b73256

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

doc/Language/py-nutshell.rakudoc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -405,16 +405,21 @@ I<Raku>
405405
Declaring a function (subroutine) with C<def> in Python is accomplished
406406
with C<sub> in Raku.
407407

408+
Python
409+
408410
=begin code :lang<python>
409-
def add(a, b): # Python
411+
def add(a, b):
410412
return a + b
413+
=end code
414+
415+
Raku
411416

412-
sub add(\a, \b) { # Raku
417+
=begin code
418+
sub add(\a, \b) {
413419
return a + b
414420
}
415421
=end code
416422

417-
418423
The C<return> is optional; the value of the last expression is used as
419424
the return value:
420425

0 commit comments

Comments
 (0)