use experimental :cached;
proto pascal(Int, Int) is cached {*}
multi pascal(Int, 0) { 1 }
multi pascal(Int $a, $ where * == $a) { 1 }
multi pascal(Int $a, Int $b where * < $a) {
pascal($a - 1, $b) + pascal($a - 1, $b - 1)
}
sub MAIN(Int :$row!, Int :$col!) {
say pascal +$row, +$col
}