[ create a new paste ] login | about

Link: http://codepad.org/xFRWOlIB    [ raw code | output | fork ]

ajiyoshi - Ruby, pasted on Apr 15:
1
2
3
#自分で書く必要はない
p (1..10).inject(0){|a, b| a + b}
p ["a", "b", "c"].inject(""){|a, b| a + b}


Output:
1
2
55
"abc"


Create a new paste based on this one


Comments: