lucs Oh, this works: 00:53
m: my $n = 1; my $s = 'a - a - a a'; $s ~~ s:g/ a /A{$n++}/; say $s;
camelia A1 - A2 - A3 A4 00:54
08:14 dano left 09:00 shiuanyi joined 09:04 shiuanyi left 11:03 shiuanyi joined 11:07 shiuanyi left 14:54 apogee_ntv left 14:56 apogee_ntv joined 15:24 apogee_ntv left 15:25 apogee_ntv joined
timemelon I'm struggling with adding types to a sub with an @-sigiled parameter: sub takes-typed(Int @matrix) { 'ok' } say takes-typed Array[Int].new: shape => (2, 2), (1, 2), (3, 4); 18:51
when I run this, I get this error: Type check failed in binding to parameter '@matrix'; expected Positional[Int] but got Array[Int] (Array[Int].new(:shap...)
but Array implements Positional no? so I'm confused 18:52
a different question, but for the same task: [0] > my @foo = (1, 2, 3), (4, 5, 6) [(1 2 3) (4 5 6)] [1] > [Z] @foo ((1 4) (2 5) (3 6)) [2] > [Z]@foo ===SORRY!=== Error while compiling: Two terms in a row ------> [Z]⏏@foo expecting any of: infix infix stopper statement end statement modifier statement modifier loop why is a space needed between [Z] and @foo? 19:28