wip
This commit is contained in:
parent
fbdc710918
commit
7bbf3a5070
5 changed files with 57 additions and 1 deletions
7
ack.rkt
Normal file
7
ack.rkt
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
;; The first three lines of this file were inserted by DrRacket. They record metadata
|
||||
;; about the language level of this file in a form that our tools can easily process.
|
||||
#reader(lib "htdp-advanced-reader.ss" "lang")((modname ack) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #t #t none #f () #f)))
|
||||
(define (ack n m)
|
||||
(cond [(= 0 n) (+ m 1)]
|
||||
[(= 0 m) (ack (- n 1) 1)]
|
||||
[else (ack (- n 1) (ack n (- m 1)))]))
|
||||
Loading…
Add table
Add a link
Reference in a new issue