Rspec 2 exercises question


I am confused with the RSPECT Practice 2 exercises, so I looked at the solutions. Where is the &prc defined? I was expecting to see more code to reverse a string, add 2 numbers together etc, but I see &prc instead. Am I missing some instructions somewhere?


Hi Barbara,
If you’re working through the Alpha Curriculum online, I think your questions may be answered by taking another look at the “Blocks and Procs” page in the Enumerables section. That page talks a bit about where the def of the proc (&prc) is coming from. Good luck!

–also, I’d be happy to try to answer more questions about those exercises, but I’m still working through the alpha materials myself, and I think the Blocks and Procs page does a better job than I can do anyway :slight_smile:

1 Like

Just FYI: The blog post below covers basically the same material as the “Blocks and Procs” section of the Alpha Curriculum, only a lot more clearly and concisely:

1 Like