delete trailing whitespaces in 1.scm

This commit is contained in:
Yuichi Nishiwaki 2014-03-25 14:32:56 +09:00
parent 594742f845
commit a7ff80090b
1 changed files with 16 additions and 16 deletions

View File

@ -11,7 +11,7 @@
;; means for inter-referential definition ;; means for inter-referential definition
(define append-reverse #f) (define append-reverse #f)
(define (cons* x . args) (define (cons* x . args)
(let rec ((acc '()) (x x) (lst args)) (let rec ((acc '()) (x x) (lst args))
(if (null? lst) (if (null? lst)
@ -135,7 +135,7 @@
(if (pair? lis2) (if (pair? lis2)
(rec (cdr lis1) (cdr lis2)) (rec (cdr lis1) (cdr lis2))
(begin (set-cdr! lis1 '()) flist)))))) (begin (set-cdr! lis1 '()) flist))))))
(define (split-at x i) (define (split-at x i)
(values (take x i) (drop x i))) (values (take x i) (drop x i)))
@ -147,7 +147,7 @@
(define (last-pair pair) (define (last-pair pair)
(take-right pair 1)) (take-right pair 1))
(define first car) (define first car)
(define second cadr) (define second cadr)
(define third caddr) (define third caddr)
@ -165,7 +165,7 @@
(define (tenth pair) (define (tenth pair)
(list-ref pair 9)) (list-ref pair 9))
(export car cdr car+cdr list-ref (export car cdr car+cdr list-ref
caar cadr cdar cddr caaar caadr cadar caddr cdaar cdadr cddar cdddr caar cadr cdar cddr caaar caadr cadar caddr cdaar cdadr cddar cdddr
caaaar caaadr caadar caaddr cadaar cadadr caddar cadddr cdaaar cdaadr caaaar caaadr caadar caaddr cadaar cadadr caddar cadddr cdaaar cdaadr
@ -184,7 +184,7 @@
(define (length+ lst) (define (length+ lst)
(if (not (circular-list? lst)) (if (not (circular-list? lst))
(length lst))) (length lst)))
(define (concatenate lists) (define (concatenate lists)
(apply append lists)) (apply append lists))
@ -207,7 +207,7 @@
(let ((rst (cdr lst))) (let ((rst (cdr lst)))
(set-cdr! lst acc) (set-cdr! lst acc)
(rec rst lst))))) (rec rst lst)))))
(define (append-reverse rev-head tail) (define (append-reverse rev-head tail)
(if (null? rev-head) (if (null? rev-head)
tail tail
@ -253,7 +253,7 @@
(if (null? tflst) (if (null? tflst)
n n
(rec (cdr tflst) (if (car tflst) (+ n 1) n))))) (rec (cdr tflst) (if (car tflst) (+ n 1) n)))))
(export length length+ (export length length+
append append! concatenate concatenate! append append! concatenate concatenate!
reverse reverse! append-reverse append-reverse! reverse reverse! append-reverse append-reverse!
@ -266,10 +266,10 @@
;; fold-right unfold-right pair-fold right reduce-right ;; fold-right unfold-right pair-fold right reduce-right
;; append-map append-map! ;; append-map append-map!
;; map! pair-for-each filter-map map-in-order ;; map! pair-for-each filter-map map-in-order
;; means for inter-referential definition ;; means for inter-referential definition
(define every #f) (define every #f)
(define (fold kons knil clist . clists) (define (fold kons knil clist . clists)
(if (null? clists) (if (null? clists)
(let rec ((acc knil) (clist clist)) (let rec ((acc knil) (clist clist))
@ -331,7 +331,7 @@
(define (reduce-right f ridentity list) (define (reduce-right f ridentity list)
(fold-right f ridentity list)) (fold-right f ridentity list))
(define (unfold p f g seed . tail-gen) (define (unfold p f g seed . tail-gen)
(let ((tail-gen (if (null? tail-gen) (let ((tail-gen (if (null? tail-gen)
(lambda (x) '()) (lambda (x) '())
@ -355,7 +355,7 @@
;; means for inter-referential definition ;; means for inter-referential definition
(define pair-for-each #f) (define pair-for-each #f)
(define (map! f list . lists) (define (map! f list . lists)
(if (null? lists) (if (null? lists)
(pair-for-each (lambda (x) (set-car! x (f (car x)))) list) (pair-for-each (lambda (x) (set-car! x (f (car x)))) list)
@ -398,7 +398,7 @@
(if it (if it
(lambda (x) (cont (cons it x))) (lambda (x) (cont (cons it x)))
(lambda (x) (cont x))))))))) (lambda (x) (cont x)))))))))
(export map for-each (export map for-each
fold unfold pair-fold reduce fold unfold pair-fold reduce
fold-right unfold-right pair-fold-right reduce-right fold-right unfold-right pair-fold-right reduce-right
@ -418,7 +418,7 @@
;; means for inter-referential definition ;; means for inter-referential definition
(define remove #f) (define remove #f)
(define (partition pred list) (define (partition pred list)
(values (filter pred list) (values (filter pred list)
(remove pred list))) (remove pred list)))
@ -434,10 +434,10 @@
(begin (set-cdr! lst (rec (cdr lst))) (begin (set-cdr! lst (rec (cdr lst)))
lst) lst)
(rec (cdr lst)))))) (rec (cdr lst))))))
;; means for inter-referential definition ;; means for inter-referential definition
(define remove! #f) (define remove! #f)
(define (partition! pred list) (define (partition! pred list)
(values (filter! pred list) (values (filter! pred list)
(remove! pred list))) (remove! pred list)))
@ -548,7 +548,7 @@
(if (apply pred (map car clists)) (if (apply pred (map car clists))
n n
(rec (map cdr clists) (+ n 1))))))) (rec (map cdr clists) (+ n 1)))))))
(export member memq memv (export member memq memv
find find-tail find find-tail
any every any every