Mercurial > hg > Papers > 2019 > anatofuz-thesis
view paper/codes/test.nqp @ 122:a3ff00c33fd7 default tip
update slide
author | anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 20 Feb 2019 12:05:38 +0900 |
parents | 3bab40636107 |
children |
line wrap: on
line source
sub add_test(int $n) { my $sum := 0; while nqp::isgt_i($n,1) { $sum := nqp::add_i($sum,$n); $n := nqp::sub_i($n,1); } return $sum; } say(add_test(10));