我把字母倒过来了。p
我似乎d
做不到的是让一串单词颠倒过来。像house
倒过来一样ǝsnoɥ
。任何帮助,将不胜感激。我快完成了。我正在使用带有列表缩写的初学者。
#;(first (first l2))
#;(first (rest l2))
#;(first (rest (first l2)))
(define (helper character list)
(cond [(string=? character (first (first list))) (first (rest (first list)))]
[else (helper character (rest list))]))
(check-expect (helper "p" table-1) "d")
(check-expect (helper "t" table-1) "ʇ")
;;_______________________________________________________________________________
(define (upside-down string)
(upside-down "cat")