| 1 |
;;; |
| 2 |
;;; util/list.scm - more list library |
| 3 |
;;; |
| 4 |
;;; Copyright (c) 2003-2024 Shiro Kawai <[email protected]> |
| 5 |
;;; Copyright(C) 2003 by Alex Shinn ([email protected]) |
| 6 |
;;; |
| 7 |
;;; Permission to use, copy, modify, distribute this software and |
| 8 |
;;; accompanying documentation for any purpose is hereby granted, |
| 9 |
;;; provided that existing copyright notices are retained in all |
| 10 |
;;; copies and that this notice is included verbatim in all |
| 11 |
;;; distributions. |
| 12 |
;;; This software is provided as is, without express or implied |
| 13 |
;;; warranty. In no circumstances the author(s) shall be liable |
| 14 |
;;; for any damages arising out of the use of this software. |
| 15 |
;;; |
| 16 |
|
| 17 |
;; This module is obsoleted - the functions are supported in the core. |
| 18 |
;; We keep this module just for the backward compatibility. |
| 19 |
(define-module util.list |
| 20 |
(export take* drop* take-right* drop-right* split-at* |
| 21 |
slices intersperse cond-list |
| 22 |
alist->hash-table hash-table->alist |
| 23 |
|
| 24 |
rassq rassv rassoc |
| 25 |
assq-ref assv-ref assoc-ref |
| 26 |
rassq-ref rassv-ref rassoc-ref |
| 27 |
assq-set! assv-set! assoc-set! |
| 28 |
)) |
| 29 |
(select-module util.list) |
| 30 |
|
| 31 |
(define take* (with-module gauche take*)) ;liblist |
| 32 |
(define drop* (with-module gauche drop*)) ;liblist |
| 33 |
(define take-right* (with-module gauche take-right*)) ;liblist |
| 34 |
(define drop-right* (with-module gauche drop-right*)) ;liblist |
| 35 |
(define split-at* (with-module gauche split-at*)) ;liblist |
| 36 |
(define slices (with-module gauche slices)) ;liblist |
| 37 |
(define intersperse (with-module gauche intersperse)) ;liblist |
| 38 |
(define-syntax cond-list (with-module gauche cond-list)) ;libmacro |
| 39 |
|
| 40 |
(define rassoc (with-module gauche rassoc)) ;liblist |
| 41 |
(define rassq (with-module gauche rassq)) ;liblist |
| 42 |
(define rassv (with-module gauche rassv)) ;liblist |
| 43 |
(define assoc-ref (with-module gauche assoc-ref)) ;liblist |
| 44 |
(define assq-ref (with-module gauche assq-ref)) ;liblist |
| 45 |
(define assv-ref (with-module gauche assv-ref)) ;liblist |
| 46 |
(define rassoc-ref (with-module gauche rassoc-ref)) ;liblist |
| 47 |
(define rassq-ref (with-module gauche rassq-ref)) ;liblist |
| 48 |
(define rassv-ref (with-module gauche rassv-ref)) ;liblist |
| 49 |
(define assoc-set! (with-module gauche assoc-set!)) ;liblist |
| 50 |
(define assq-set! (with-module gauche assq-set!)) ;liblist |
| 51 |
(define assv-set! (with-module gauche assv-set!)) ;liblist |
| 52 |
|
| 53 |
(define alist->hash-table (with-module gauche alist->hash-table)) ;libdict |
| 54 |
(define hash-table->alist (with-module gauche hash-table->alist)) ;libdict |