From 7520de3dcdf7c762db904e7fa8d102a35f16b0c7 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Tue, 10 Dec 2013 00:21:43 -0800 Subject: [PATCH] cosmetic changes --- piclib/built-in.scm | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/piclib/built-in.scm b/piclib/built-in.scm index 3b2af37e..160e3295 100644 --- a/piclib/built-in.scm +++ b/piclib/built-in.scm @@ -183,27 +183,6 @@ (import (picrin macro) (picrin core-syntax)) -(define (list . args) - args) - -(define (caar p) - (car (car p))) - -(define (cadr p) - (car (cdr p))) - -(define (cdar p) - (cdr (car p))) - -(define (cddr p) - (cdr (cdr p))) - -(define (append xs ys) - (if (null? xs) - ys - (cons (car xs) - (append (cdr xs) ys)))) - (define (any pred list) (if (null? list) #f @@ -311,6 +290,21 @@ (list? (cdr obj)) #f))) +(define (list . args) + args) + +(define (caar p) + (car (car p))) + +(define (cadr p) + (car (cdr p))) + +(define (cdar p) + (cdr (car p))) + +(define (cddr p) + (cdr (cdr p))) + (define (make-list k . args) (if (null? args) (make-list k #f) @@ -324,6 +318,12 @@ 0 (+ 1 (length (cdr list))))) +(define (append xs ys) + (if (null? xs) + ys + (cons (car xs) + (append (cdr xs) ys)))) + (define (reverse list . args) (if (null? args) (reverse list '())