11-Recursion in Scheme

Veröffentlicht am: 21 Februar 2021
auf dem Kanal: Dr. Andy Wicks
1,993
25

Recursion is an odd concept. It is where a function calls itself. Obviously, this creates a loop (the only kind of loop there is in functional programming). For this to work, there has to be a way out - the base case. We therefore create a function (which here is called rec-step) which contains the command to be repeated. After testing that that works we create another function which calls itself, rec-step and has at least one basecase (a way out). Once that has been tested and shown to work we can replace the call to rec-step with a lambda function so that all the code is in one place.

The code used in this video can be found via https://lyw4.life/Resources/scheme.php.


Auf dieser Seite können Sie das Online-Video 11-Recursion in Scheme mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Dr. Andy Wicks 21 Februar 2021 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 1,993 Mal angesehen und es wurde von 25 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!