Add reduce snippets to ruby snippets

This commit is contained in:
DSIW 2013-06-22 14:53:42 +02:00
parent 3699e8654f
commit 609ac9ecff

View File

@ -322,6 +322,12 @@ snippet injd
inject(${1:init}) do |${2:mem}, ${3:var}| inject(${1:init}) do |${2:mem}, ${3:var}|
${4} ${4}
end end
snippet red
reduce(${1:init}) { |${2:mem}, ${3:var}| ${4} }
snippet redd
reduce(${1:init}) do |${2:mem}, ${3:var}|
${4}
end
snippet map snippet map
map { |${1:e}| ${2} } map { |${1:e}| ${2} }
snippet mapd snippet mapd