fold from right to left
4 5 6 7
# File 'lib/ludy/array/foldr.rb', line 4 def foldr func, init reverse_each{ |i| init = func[i, init] } init end