Method: NArray#map

Defined in:
lib/n-array.rb

#map(&blck) ⇒ Object

Iterate over the elements of the n-array apply the given bloc and collect the results into a nested collection of arrays identical to the structure of the caller



107
108
109
110
111
112
113
114
115
# File 'lib/n-array.rb', line 107

def map &blck
	if dimensions > 1
		super() do |e|
			e.map(&blck)
		end
	else
		super(&blck)
	end
end