RosettaCodeData/Task/Catamorphism/R/catamorphism-2.r

3 lines
59 B
R

Reduce(function(a,b){c(a,0,b)}, c(2,3,4,5))
2 0 3 0 4 0 5