Filter, Map, Reduce, CompactMap, FlatMap - Swift - iOS Dev Interview Questions

  Рет қаралды 18,065

Sean Allen

Sean Allen

Күн бұрын

Пікірлер: 35
@DaveDDD
@DaveDDD Жыл бұрын
The way you explained trailing closures in this made something finally click in my brain! I have no idea how it was able to confuse me for so long - it’s just so simple. Thank you!
@seanallen
@seanallen Жыл бұрын
I remember that feeling! Happy to help.
@Spacer-l3j
@Spacer-l3j 10 ай бұрын
Finally this video clicked for me... Simple examples makes you understand... i have watched 3 other videos across KZbin to understand high order functions but they had stupid azz examples i couldn't understand a freking thing...
@seanallen
@seanallen 10 ай бұрын
Glad it finally clicked!
@sergiovinhal5934
@sergiovinhal5934 5 ай бұрын
Excellent video . Thank you Sean .
@seanallen
@seanallen 4 ай бұрын
Glad you enjoyed it
@kavinda_dilshan_paramsoodi
@kavinda_dilshan_paramsoodi Жыл бұрын
Never knew about a reduce, just learned it today. Thanks, sean. I've been doing it the hard way all this time.
@ANILAVCI
@ANILAVCI Жыл бұрын
Thanks for the shares. You have many followers from Turkey. Even though I watch with automatic subtitles, I learn a lot.
@gakkieNL
@gakkieNL Жыл бұрын
You can use keypaths with these high level functions. Makes for great readability!
@ellen_kapii
@ellen_kapii Жыл бұрын
Excellent explanation, as usual. Thank you!
@mahmoudhashim3720
@mahmoudhashim3720 Жыл бұрын
Big Love Sean, THANK YOU, you and Afraz are the best
@tylerwatt5651
@tylerwatt5651 Жыл бұрын
Thank you so much for putting this together! Especially for map and reduce!
@JasonMitchellAZ
@JasonMitchellAZ Жыл бұрын
Great explanations for these
@Rayana_rei
@Rayana_rei Жыл бұрын
smart explanation, clear language! very efficient.. very.. ! 👏🏻
@milanfdl1968
@milanfdl1968 Жыл бұрын
Cool video. Learned some new things today. Thank you!
@soheilpakgohar6630
@soheilpakgohar6630 Жыл бұрын
Great job Sean, before this I really got stuck which one is
@ahmednemo5954
@ahmednemo5954 Жыл бұрын
Amazing you are the best,Thanks for being one of the best is swift 👍
@seanallen
@seanallen Жыл бұрын
Thanks for the kind words, Ahmed.
@viniciushenriquepellegrini3534
@viniciushenriquepellegrini3534 Жыл бұрын
Amazing !
@bosch5053
@bosch5053 Жыл бұрын
Thanks
@filipecanzi
@filipecanzi Жыл бұрын
Thanks Sean!!
@Patrick462
@Patrick462 Жыл бұрын
Great explanations, really appreciate it. A few reactions if you're open to such things: 1. Using Double for currency values will work 99.99% of the time. It's that .01% that will drive you crazy. 2. I wouldn't use the for loop as a tool to explain filter/map/reduce. Your original explanation is great and more than sufficient. Adding discussion of the for loop way of calculating will confuse a certain percent of viewers, and slow down almost everyone.
@mario_luis_dev
@mario_luis_dev Жыл бұрын
I disagree. He’s right in bringing up the for loop for comparisons, since that is the whole point on declarative programming: streamline the uglier, more verbose imperative style
@paulcristo
@paulcristo 11 ай бұрын
Thanks.
@seanallen
@seanallen 11 ай бұрын
Happy to help!
@xfabiosoft
@xfabiosoft Жыл бұрын
How about Zip? How does it work and when is useful?
@MegaOlzo
@MegaOlzo Жыл бұрын
Thanks!)
@tigran.zakaryan
@tigran.zakaryan Жыл бұрын
thank you!
@filipchwastowski4228
@filipchwastowski4228 Жыл бұрын
cool vid, but I believe that $0 and $1 when reducing does not refer to "this and next iteration", but to "current result and current iteration" - isn't that right? :) because here you keep handling constantly "accumulating current result" with each collection's element.
@Jacob-rm7vo
@Jacob-rm7vo Жыл бұрын
Yes that is how I understood reduce, even in other languages. It would accumulate - add the first and second, then add the third to that value. I think of $0 meaning lhs (left hand side) and $1 rhs
@joshuascorca550
@joshuascorca550 Жыл бұрын
@@Jacob-rm7vo exactly. Filter iterates through the array, doing this: sumSoFar += object.numberToAdd So $0 is the lhs, and $1 is the object on the rhs. This is why Sean needs to write $1.users and not $0.users. $0 is an Int already.
@mkhasson97
@mkhasson97 Жыл бұрын
Awesome 🎉 Is there any plan for portfolio review? I’d love to hear your opinion about my website. Thank you in advance 😊
@victorriurean
@victorriurean Жыл бұрын
nice
@guitaripod
@guitaripod Жыл бұрын
69th like
Swift - Class vs. Struct Explained
7:28
Sean Allen
Рет қаралды 36 М.
Swift Optionals - How to Unwrap (real examples)
14:20
Sean Allen
Рет қаралды 14 М.
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
Swift 3 Fun Algorithms: Filter, Map, Reduce Higher Order Functions
10:39
Lets Build That App
Рет қаралды 32 М.
Swift Closures Explained
14:23
Sean Allen
Рет қаралды 71 М.
Binding vs. Bindable in SwiftUI on iOS 17
13:12
donny wals
Рет қаралды 12 М.
NavigationStack - SwiftUI Programmatic Navigation - iOS 16
20:20
How to Filter, Sort, and Map in Swift | Swift Basics #16
16:26
Swiftful Thinking
Рет қаралды 9 М.
Inheritance vs Interfaces (Protocols) In Swift
18:43
iCode
Рет қаралды 15 М.
SwiftUI - Intro to MVVM | Example Refactor | Model View ViewModel
11:55