This shows you the differences between two versions of the page.
pp:21:laboratoare:racket:recursivitate [2021/02/28 13:33] bot.pp |
pp:21:laboratoare:racket:recursivitate [2021/03/11 09:45] (current) bot.pp |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Racket: Recursivitate ====== | ====== Racket: Recursivitate ====== | ||
- | * Responsabil: [[popabogdan97@gmail.com|Bogdan Popa]] | + | * Data publicării: 08.03.2021 |
- | * Data publicării: 24.02.2020 | + | * Data ultimei modificări: 11.03.2021 |
- | * Data ultimei modificări: 24.02.2020 | + | |
===== Obiective ===== | ===== Obiective ===== | ||
Line 34: | Line 33: | ||
=== Exemplu === | === Exemplu === | ||
- | <code> | + | <code lisp> |
(define (factorial n) | (define (factorial n) | ||
(if (= n 0) | (if (= n 0) | ||
Line 53: | Line 52: | ||
=== Exemplu === | === Exemplu === | ||
- | <code> | + | <code lisp> |
(define (tail-recursion n acc) | (define (tail-recursion n acc) | ||
(if (= n 0) | (if (= n 0) | ||
Line 68: | Line 67: | ||
=== Exemplu === | === Exemplu === | ||
- | <code> | + | <code lisp> |
(define (member x L) ;; O posibilă implementare a funcției member | (define (member x L) ;; O posibilă implementare a funcției member | ||
Line 83: | Line 82: | ||
=== Exemplu === | === Exemplu === | ||
- | <code> | + | <code lisp> |
(define (fib n) | (define (fib n) | ||
(cond ((= n 0) 0) | (cond ((= n 0) 0) | ||
Line 101: | Line 100: | ||
Citiți exercițiile **rezolvate**; apoi, rezolvați exercițiile **propuse**. | Citiți exercițiile **rezolvate**; apoi, rezolvați exercițiile **propuse**. | ||
- | * {{ :20:laboratoare:racket:recursive-images-sol.zip | Soluții}} | + | * [[https://ocw.cs.pub.ro/courses/_media/pp/21/laboratoare/racket/recursivitate-skel.zip|Schelet]] |
- | * {{ :20:laboratoare:racket:recursivitate-cheatsheet.pdf |Cheatsheet}} | + | * [[https://ocw.cs.pub.ro/courses/_media/pp/21/laboratoare/racket/recursivitate-resurse.zip|Exerciții rezolvate]] |
- | * (Nu uitați și de {{ :20:laboratoare:racket:intro-cheatsheet.pdf |cheatsheet}}-ul de la primul laborator) | + | * [[https://ocw.cs.pub.ro/courses/_media/pp/21/laboratoare/racket/recursivitate-sol.zip|Soluții]] |
+ | * [[https://github.com/cs-pub-ro/PP-laboratoare/raw/master/racket/intro/racket-cheatsheet-1.pdf|Cheatsheet Laboratorul 1]] | ||
+ | * [[https://github.com/cs-pub-ro/PP-laboratoare/raw/master/racket/recursivitate/racket-cheatsheet-2.pdf|Cheatsheet Laboratorul 2]] | ||
===== Referințe ===== | ===== Referințe ===== |