title: Why can't a sub access dynamic variables when used in a "return"ed map in raku?
body: <p>It seems that a a <code>sub</code> cannot access dynamic variables when it is used inside a map and that map is &quot;return&quot;ed.</p>
  <p>Consider this piece of code:</p>
  <pre><code>sub start {
      my $*something = 'foobar';
      
      # WORKS
      say 'first say-something:';
      say-something;
      
      # WORKS
      say 'mapped say-something, no return:';
      my @foo = (^2).map({say-something});
      
      # ERROR: Dynamic variable $*something not found
      say 'mapped say-something, with return:';
      return (^2).map({say-something});
  }
  
  sub say-something {
      say $*something;
      1
  }
  
  start;
  </code></pre>
  <p>This will output:</p>
  <pre><code>first say-something:
  foobar
  mapped say-something, no return:
  foobar
  foobar
  mapped say-something, with return:
  
  Dynamic variable $*something not found
    in sub say-something at main.raku line 18
    in block &lt;unit&gt; at main.raku line 14
  </code></pre>
  <p>Why can't the sub access the dynamic variable? Is there a workaround for this?</p>