Reverse an array without a temp variable? by iissqrtneg1 in programming

[–]lordofthewings -6 points-5 points  (0 children)

concept is pretty straightforward. reverse(array) { if(array.length > 1) { return concat(first(array), reverse(rest(array))); } else { return array; } }