[SOLVED] 程序代写代做代考 DrRacket Rewrite in R5RS environment in DRRACKET

30 $

File Name: 程序代写代做代考_DrRacket_Rewrite_in_R5RS_environment_in_DRRACKET.zip
File Size: 687.66 KB

SKU: 7076972974 Category: Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Or Upload Your Assignment Here:


Rewrite in R5RS environment in DRRACKET
Rewrite by let,let*,letrec,
改写成let,let*,letrec形式即可,最好能尝试letrec格式。谢谢!

(define combine
(lambda (list1)
(cond
((null? list1) ‘())
((pair? list1) (append(combine(car list1)) (combine(cdr list1))))
(else (list list1))
)))

(define spell-checker
(lambda (hflist word bitvec)
(if (null? hflist)
‘()
(combine (list (gen-checklist ((car hflist) word) bitvec) (spell-checker (cdr hflist) word bitvec)))
)
))

(define gen-checklist
(lambda (key bitvec)
(if (null? bitvec)
(list 0)
(if (= key (car bitvec))
(list 1)
(gen-checklistkey (cdr bitvec))
)
)
))

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] 程序代写代做代考 DrRacket Rewrite in R5RS environment in DRRACKET
30 $