#Scala - Your First Programming Language - Part 7.1 - Recursion

preview_player
Показать описание
In this video we will talk about recursion as a way of encoding loops. Even though this is a very beginner friendly tutorial in which we will learn about threads, stacks and their overflows we will also touch on the topics of tail recursion and even memoization and dynamic programming.

This video is part of the following playlist:

Cheers and Happy Coding!

#Tail #Recursion #tutorial
Рекомендации по теме
Комментарии
Автор

Absolutely love your videos. Great work!

akkineni
Автор

Thanks for explaining how the Thread and the LIFO Stack. I understand there that all recursive functions can be a while loop, Java only exposes while loops.
Scala on the other hand can safely pull put recursive calls without killing the stack, furthermore, the annotation can ensure tail recursiveness, which traduces in performance!
Thanks for this hand-holding awesome video, also, thanks for showing me revolver! woow no need to restart sbt, I found that truly annoying. See you in the next one

estebanmarin
Автор

I actually didn't get why "val leaveMeAlone = true" stops calling the method "method" ? Without the the val, "method" was in the infinite loop, now val leaveMeAlone is true is just assigned the value true also in the infinite loop and then method "method" as well. !!! I might miss something !!! at 9:26

KiranRoy
Автор

There are 2 methods method1 and method2 and they have same code, but why there is only one result. If both the methods are called there should be same result twice!!! I didn't get that !!!

KiranRoy
welcome to shbcf.ru