This is probably a silly question, but…
I often have a code pattern like the following:
for n = 1:something_large anon_func = x -> some_func(x, n) #Example anon func that needs to be defined within loop i = findfirst(anon_func, A) # some other code end
Will a code pattern like this be creating a huge number of anonymous functions, and if so, are there any implications to this? Or will it create only one anonymous function at the code lowering point, and so there is basically nothing to worry about here? Any other potential pitfalls I should be aware of?
Cheers and thanks to all responders,