Merge pull request #112 from nahuakang/ex047-reference

Edit comment to specify `for reference`
pull/2/head
Dave Gauer 2 years ago committed by GitHub
commit 4ce16782d0

@ -85,7 +85,7 @@ pub fn main() void {
while (aliens_alive > 0) { while (aliens_alive > 0) {
aliens_alive = 0; aliens_alive = 0;
// Loop through every alien... // Loop through every alien by reference (* makes a pointer capture value)
for (aliens) |*alien| { for (aliens) |*alien| {
// *** Zap the alien with the heat ray here! *** // *** Zap the alien with the heat ray here! ***

Loading…
Cancel
Save