MA
Size: a a a
MA
MA
A
i
Т
Т
i
Т
VK
$@% у переменных - не понятно, что используется - переменная или функцияVK
VK
This is the only difference:
each:
irb> [1,2,3].each { |x| }
=> [1, 2, 3]
irb> x
NameError: undefined local variable or method `x' for main:Object
from (irb):2
from :0
for:
irb> for x in [1,2,3]; end
=> [1, 2, 3]
irb> x
=> 3
VK
VK
S
Т
Т
VK
VK
say (1, 2, 3) »*» 2; # OUTPUT: «(2 4 6)»
say (1, 2, 3, 4) »~» <a b>; # OUTPUT: «(1a 2b 3a 4b)»
say (1, 2, 3) »+« (4, 5, 6); # OUTPUT: «(5 7 9)»
say (&sin, &cos, &sqrt)».(0.5);
# OUTPUT: «(0.479425538604203 0.877582561890373 0.707106781186548)»
my @l = <a b c> Z~ 1, 2, 3; # OUTPUT: «[a1 b2 c3]»
N