fork download
  1. (DEFUN FINDFIGURE(F V C)
  2. (COND ((NULL C) '"Нет")
  3. ((AND (EQUAL F (CAAR C)) (= V (CADDAR C))) '"Да")
  4. (1 (FINDFIGURE F V (CDR C)))
  5. )
  6. )
  7.  
  8. (PRINT (FINDFIGURE '"Пешка" 2 '(("Ферзь" d 1) ("Пешка" a 2) ("Пешка" b 2) ("Пешка" c 2) ("Слон" e 5))) )
  9. (PRINT (FINDFIGURE '"Пешка" 3 '(("Ферзь" d 1) ("Пешка" a 2) ("Пешка" b 2) ("Пешка" c 2) ("Слон" e 5))) )
  10. (PRINT (FINDFIGURE '"Слон" 5 '(("Ферзь" d 1) ("Пешка" a 2) ("Пешка" b 2) ("Пешка" c 2) ("Слон" e 5))) )
Success #stdin #stdout 0.02s 10544KB
stdin
Standard input is empty
stdout
"Да" 
"Нет" 
"Да"