Anonymous user
Define a primitive data type: Difference between revisions
m
→{{header|Perl 6}}
(→[[Define a primitive data type#ALGOL 68]]: fix lang tag) |
|||
Line 677:
# dies, too small. string is 0 interpreted numerically</lang>
=={{header|Perl 6}}==
{{works with|Rakudo Star|
<lang perl6>subset OneToTen of Int where { 1 <= $^n <= 10 }
Line 686:
<code>{ 1 <= $^n <= 10 }(11)</code> returns a false value, so the second assignment throws an exception. You can use any unary function in place of <code>{ 1 <= $^n <= 10 }</code>, so this, for example, is also legal:
<lang perl6>subset Prime of Int where { $^n > 1 and $^n
=={{header|PicoLisp}}==
|