[aisleriot] guile: Remove nthcdr definition from api.scm
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aisleriot] guile: Remove nthcdr definition from api.scm
- Date: Sat, 3 Dec 2011 16:49:45 +0000 (UTC)
commit 66a97a2bf70d5be1a9cce3376a04e9e5f65cc765
Author: Christian Persch <chpe gnome org>
Date: Wed Nov 30 19:16:48 2011 +0100
guile: Remove nthcdr definition from api.scm
Just use list-tail.
games/api.scm | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/games/api.scm b/games/api.scm
index 7897f70..607b13f 100644
--- a/games/api.scm
+++ b/games/api.scm
@@ -544,7 +544,7 @@
(add-cards! end-slot cards))
(define-public (remove-n-cards slot-id n)
- (set-cards! slot-id (nthcdr n (get-cards slot-id))))
+ (set-cards! slot-id (list-tail n (get-cards slot-id))))
(define-public (deal-cards-from-deck deck slot-list)
(if (not (null? slot-list))
@@ -619,10 +619,6 @@
(define-public (register-undo-function function data)
(set! MOVE (cons '(function data) (cdr MOVE))))
-; common lisp procedure not provided in guile 1.3
-(define-public (nthcdr n lst)
- (if (zero? n) lst (nthcdr (+ -1 n) (cdr lst))))
-
;; INTERNAL procedures
; global variables
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]