lib/sekka/roman-lib.nnd in sekka-0.8.6 vs lib/sekka/roman-lib.nnd in sekka-0.8.7
- old
+ new
@@ -32,10 +32,12 @@
;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;;;
;;; $Id:
;;;
(use srfi-1)
+(use util.list)
+(use util.combinations)
;; 子音が1音だけ入ったテーブル
;; このテーブルはruby-romkan から変換し、一部不足を追加した。
;; クンレイ、日本式、ヘボン式もデータ中に併記し全てを網羅している。
(define sekka-kana->roman-alist-short
@@ -769,20 +771,9 @@
(define (gen-roman->katakana roman-str roman-method)
(filter-map
(lambda (x)
(gen-hiragana->katakana x))
(gen-roman->hiragana roman-str roman-method)))
-
-;; This function port from Gauche-0.9's util.combinations.
-(define (cartesian-product lol)
- (if (null? lol)
- (list '())
- (let ((l (car lol))
- (rest (cartesian-product (cdr lol))))
- (append-map
- (lambda (x)
- (map (lambda (sub-prod) (cons x sub-prod)) rest))
- l))))
(define (patterns->roman-list patterns)
(uniq
(sort