I am curious about + operator , suppose we need to develop similar like either pass closure or +operator do we need to add argument with default nil value or some other overload?
I want to understand one thing how the Value in closure takes values of array as we do not specify that values should be actual values and not their index. Pls clarify
This randomness is normal for Dictionaries and Sets since by nature these collections are nor ordered. The way the elements are hashed differs from run to run. I don't know about the internals but it could be due to random seeding, possibly for security reasons.
Did you find this tip useful? Are you planning on using it in your apps? Let me know in the comments 🚀
Great videos - love this short format perfect for playing and learning in Playground! ♥
Excellent tips
Thank you! ☺️
Awesome simple example how to use reduce! Congrats! Which functional programming tools do you think are more usefull?
Thank you!
I am curious about + operator , suppose we need to develop similar like either pass closure or +operator do we need to add argument with default nil value or some other overload?
I ❤️ reduce.
I did find it useful, I didn't know about reduce(). My question: is It the same time complexity as a for-loop or is it better?
Good question! It’s the same complexity as in a for-loop: the same number of operations is being executed, it’s just a different API around them.
Cool vis man. The intro sound is so loud and the rest so quiet. Can you bump up the sound on the part you are talking ? Thanks !
Sorry about that! Matching audio level turns out to be always more challenging than it looks 😅
I want to understand one thing how the Value in closure takes values of array as we do not specify that values should be actual values and not their index. Pls clarify
Hi Vincent. Do you know maybe why the result for reduce(into:) is in a random order ?
It indeed shouldn’t be in random order. Are you getting a random order using the code I showed in the video?
@@v_pradeilles Yes the code is exactly the same and I'm getting this result in an xcode playground and on the online compilers :/
This randomness is normal for Dictionaries and Sets since by nature these collections are nor ordered. The way the elements are hashed differs from run to run. I don't know about the internals but it could be due to random seeding, possibly for security reasons.