Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. (define (teste p1)
  2. (let* ((lst (nova-lista))
  3. (linha (linha-pos p1))
  4. (coluna (coluna-pos p1))
  5. (a (- linha 1))
  6. (b (+ linha 1))
  7. (c (- coluna 1))
  8. (d (+ coluna 1)))
  9. (cond ((< a 0) (insere (faz-pos 1 coluna) lst))
  10. ((= b 8) (insere (faz-pos 6 coluna) lst))
  11. ((< c 0) (insere (faz-pos linha 1) lst))
  12. ((= d 8) (insere (faz-pos linha 6) lst))
  13. (else (begin
  14. (insere (faz-pos linha c) lst)
  15. (insere (faz-pos linha d) lst)
  16. (insere (faz-pos a coluna) lst)
  17. (insere (faz-pos b coluna) lst))))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement