11/21 Symbols Meet Procs


#1



I am totally lost on this lesson. It talks about converting symbols to procs but I don't see procs anywhere. Furthermore, for me, the lesson appears to be taking each integer in a numbers array, and then converting it into a string. Nowhere do I see procs, so how do Symbols meet procs? Am I the only one missing something?

Please help. Please use simple example if possible. Thanks in advance!


https://www.codecademy.com/en/courses/ruby-beginner-en-L3ZCI/1/6?curriculum_id=5059f8619189a5000201fbcb


Replace this line with your code.


#2

@jaydacoder,
Maybe reading some article's written by programmers in stackoverflow.com
google search
== discussions / opinions ==
ruby symbols to procs site:stackoverflow.com
for instance
http://stackoverflow.com/questions/33112777/simple-ruby-proc-with?lq=1


#3

Try this code:

numbers_array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

puts strings_array = numbers_array.collect(&:to_s)


#4

I get the .collect bit but (&:to_s) what is the significance of the s?


#5

(&:to_s) turns integers (or numbers) into strings

(&:to_i) does the opposite; it turns strings into integers (or numbers)