The code indeed save each fib_val
into the fibHash
map. The find method called on fibHash
searches the map to see if the value was previously computed. If so, find
returns an iterator on this value and the function returns it (return *fibIter
).
fibHash[ n ] = fib_val;
adds a new value in the map.