aboutsummaryrefslogtreecommitdiff
path: root/challenge-204/mark-anderson/raku/ch-1.raku
blob: e7c4a2f3dbe768bae50fc022cebf13bb80c0cae9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env raku
use Test;

ok  monotonic-array(1,2,2,3);
nok monotonic-array(1,3,2);
ok  monotonic-array(6,5,5,4);
 
sub monotonic-array(*@a)
{
    return 1 if [<=] @a;
    return 1 if [>=] @a;
    return 0
}