Advertisement
VladNitu

Recursive sum 1..x Racket

Mar 2nd, 2023
424
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Racket 0.09 KB | None | 0 0
  1. (let ([sum (λ (self)
  2. (λ (x)
  3. (if (<= x 1)
  4. 1
  5. (+ x ((self self) (- x 1))))))])
  6. ((sum sum) 3))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement