メンバーを利用しようとしていますか?ユーザの入力における単語の特定のストリングの存在を決定する機能を有する。ラケットスキーム - メンバー?機能conundrum
メンバー?関数が使用されている:
(define (member? item seq)
(sequence-ormap (lambda (x)
(equal? item x))
seq))
しかし、私のプログラムの構造は次の比較を行うために私を必要とします。
(?メンバー「(名前)」塁の(名前を))
その出力の例は以下の通りです:しかし、私が見る問題はこのことです
> (car (car *strong-cues*))
'((the names) (their names))
> (car (car (car *strong-cues*)))
'(the names)
> (member? (car (car (car *strong-cues*))) '(the names of the basemen))
#f
「名前」(この場合は「塁の名前」である)、ユーザの入力に明確です〜です
「the or the names of or 'or or the basemen」には(名前)がありますか?
この比較を適切に行う方法はありますか?「名前」がユーザーの入力内にある文字列の場合、「名前」を検索するとtrueが返されます。
あなたの説明は簡単で有益です。どうもありがとうございました!! –