rustlings icon indicating copy to clipboard operation
rustlings copied to clipboard

Make vecs2 more gentle

Open daniel-pfeiffer opened this issue 10 months ago • 0 comments

vec_map_example is a bit much! It is not pretty printed across multiple lines. The next function is more readable than this 1st contact with iter.

Also I would separate

// An anonymous function, called a closure, which we store in a variable.
let my_closure = |element| element + 1;

Not sure if it should be called a lambda, when it doesn’t even close over anything. That name would be more familiar to many. OTOH, lambda has been hijacked for something unrelated by cloud providers.

Also, Ctrl-clicking on the 1st error message, jumps straight to the 3rd function. This leap-frogs the intended learning curve.

daniel-pfeiffer avatar Mar 20 '25 21:03 daniel-pfeiffer