I am reading through the lecture on the McCall search model and I had a question regrading compute_reservation_wage_direct function’s inputs. I understand the ‘params’, ‘max_iter’ and ‘tol’ inputs but the ‘v_iv = collect(.)’ input is unclear to me. I am very new to programming to this might be something trivial but I was unable to find an explanation in the actual lecture.
My experience with functions in Julia is that after I have created a function, I specify the inputs (so far I’ve only had parameters as inputs) and the function returns a value. So I don’t understand why I need the ‘v_iv = collect(.)’ input. If I have understood correctly, the ‘collect’ function creates an array but I am confused as to why this is needed.
I apologise if this is all very trivial.