I like this series of videos. I like that not just basics are explained but also some advanced things. Looking forward to the next episode to find out more about advanced functions in KOtlin Collection's framework.
SumOf returning a pair of sum and the original value (or mapping result) would have been great addition to the existing extensions. Even better if it would have looked like a common function that might've allow to choose both, aggregation and transformation function.
can you explain plz what is the difference of someCollection.map { } vs someCollection.map() . I have seen it with other extension functions other than map and It is not clear to me. Thank you.
In Kotlin if the last argument to a function, is a function itself, you can pull the lambda outside of the parentheses (purely for convenience). So: list.map( {it * 2} ) is the same as list.map { it * 2} because map takes a function as its last (and only) parameter. Furthermore, if a function takes two arguments but the last one is a function, the following two are equivalent: takesTwoArgs(argument1, { it *2}) takesTwoArgs (argument1) { it*2 }
Usually (and, IIRC in previous episodes as well), JetBrains Mono - but I needed a bit of a more condensed font to fit inlay hints, code, and results into the square window in this episode, so I'm using Iosevka here! :)
Kotlin lacks the "Queue" data structure! Kotlin's ArrayDeque is indexed like a List, causing a runtime penalty when you poll from the front. This is different from Java's ArrayDeque which is not indexed and is a true Deque. Using Kotlin's ArrayDeque as a Queue or Deque will make your program slow. It should be called IndexedArrayDeque. Please add a True Deque implementation in Kotlin!
Guys this channel is slowly becoming my favorite TH-cam Channel. Keep it up.
Good to hear!
What amazing series! Great content, always with humor and straight to the point. Keep going guys.
Happy to hear that you liked it!
what an amazing thing if each programming language have a channel like this
Documentation for Kotlin is so good, this is a big plus. Keep making those videos. :)
I like this series of videos. I like that not just basics are explained but also some advanced things. Looking forward to the next episode to find out more about advanced functions in KOtlin Collection's framework.
Exactly the information I wanted to learn. Perfect pace. Interesting and entertaining. Thanks for the video!
Did not know about partition! Cool!
S(h)ame
Same here. So I'm glad I watched this. :)
Great series! Can't wait for the next episode. Hopefully soon... ;)
I loved Swift but now with this episode, I love Kotlin too 😊
SumOf returning a pair of sum and the original value (or mapping result) would have been great addition to the existing extensions. Even better if it would have looked like a common function that might've allow to choose both, aggregation and transformation function.
Thank you , great content, i need data structure course in kotlin any recommendations?
Beautiful format, though there was no word about default implementations and covariance of immutables.
Thanks Sebastian!
Really Amazing conent! Like Koltin dev with 5 years dev? really cool lections in 12 minuts!!
I love the aces !!
wow totally mind blowing what string HOF can do
Amazing😍
Thanks for video, how can I switch to the mode what you showed in IDE?
Thnaks for content :)
You are welcome!
Thanks so much
You are welcome!
Insightful
didn't knew about partition
It is always cool to learn something new
Nice content!!
can you explain plz what is the difference of someCollection.map { } vs someCollection.map() . I have seen it with other extension functions other than map and It is not clear to me. Thank you.
In Kotlin if the last argument to a function, is a function itself, you can pull the lambda outside of the parentheses (purely for convenience).
So:
list.map( {it * 2} ) is the same as list.map { it * 2} because map takes a function as its last (and only) parameter.
Furthermore, if a function takes two arguments but the last one is a function, the following two are equivalent:
takesTwoArgs(argument1, { it *2})
takesTwoArgs (argument1) { it*2 }
trailing lambdas
Thank you very much, your explanation solved my confusion.
Side question: What font do you use? :)
Usually (and, IIRC in previous episodes as well), JetBrains Mono - but I needed a bit of a more condensed font to fit inlay hints, code, and results into the square window in this episode, so I'm using Iosevka here! :)
@@sebastianaigner9125 Oh, I see. It's just a newer version that looks a little different than the one I used.
@@sebastianaigner9125 iosevka has been my favorite for a few years now too , I use it everywhere as monospaced font!
Isn't Array a collection, and if not why?
you didn't say "take care" at the end
Kotlin lacks the "Queue" data structure! Kotlin's ArrayDeque is indexed like a List, causing a runtime penalty when you poll from the front. This is different from Java's ArrayDeque which is not indexed and is a true Deque. Using Kotlin's ArrayDeque as a Queue or Deque will make your program slow. It should be called IndexedArrayDeque. Please add a True Deque implementation in Kotlin!
Nice content.. 12 mins actually equivalent of 1 hour of stuff.... dude go bit slow....