Ruby n, 1 = gets.split.map &:to_i -


this question has answer here:

i looking @ ruby code. unsure happening on line:

n,1 = gets.split.map &:to_i 

i understand input array of strings being mapped array of integers why being assigned n,1?

that line of code doesn't anything, it's syntaxerror. can't assign 1, that's not legal name local variable.


Comments

Popular posts from this blog

c# - ItextSharp font color issue in ver 5.5.4+ -

jquery - Multiple issues with pushstate: history, loading, calling functions -

ios - retrievePeripherals deprecated in IOS7 how to substitude it with retrievePeripheralsWithIdentifiers -