Название: Learning Recursion Автор: Alvin Alexander Издательство: Independently published Год: 2023 Страниц: 115 Язык: английский Формат: pdf (true) Размер: 10.2 MB
In this book, Alvin Alexander brings his well-known, simple teaching style to the topic of recursion, also known as recursive programming. In the book you’ll learn how to write functions that call themselves. He covers the basics of recursion, and then covers the important topic of tail recursion.
The source code examples are written with the Scala 3 programming language, but he doesn’t use any special Scala techniques, so the code should be readable if you know other languages like C, C#, Java, Kotlin, Python, etc.
You’re about to jump into a series of lessons on recursive programming. Please note that some of these lessons may be overkill for some people. Basically what I do in the following chapters is introduce recursion in several different ways — for example, using code, using a conversation between two developers, and using images — so if one of those ways works for you, great! Whenever you understand recursion, just stop where you are and don’t worry about reading the remaining lessons.
1 Welcome 2 Recursion: Introduction 3 Recursion: Motivation 4 Recursion Background: Let’s Look at Lists 5 Recursion: How to Write a ‘sum’ Function 6 Recursion: How Recursive Function Calls Work 7 Visualizing the Recursive sum Function 8 Recursion: A Conversation Between Two Developers 9 Recursion: Thinking Recursively 10 JVM Stacks, Stack Frames, and Stack Overflow Errors 53 11 A Visual Look at Stacks and Frames 12 Tail-Recursive Algorithms 13 Bonus: Processing I/O with Recursion 14 The End
Внимание
Уважаемый посетитель, Вы зашли на сайт как незарегистрированный пользователь.
Мы рекомендуем Вам зарегистрироваться либо войти на сайт под своим именем.
Информация
Посетители, находящиеся в группе Гости, не могут оставлять комментарии к данной публикации.