Gauche > Archives > 2013/04/20

2013/04/20 03:12:39 UTCyamasushi
#
diff --git a/lib/gauche/dictionary.scm b/lib/gauche/dictionary.scm
index 89910b3..0d39653 100644
--- a/lib/gauche/dictionary.scm
+++ b/lib/gauche/dictionary.scm
@@ -178,10 +178,10 @@
 
 (define-method dict-fold ((dict <dictionary>) proc seed)
   ;; This depends on the fact that a dictionary is also a collection.
-  (fold dict (lambda (kv seed) (proc (car kv) (cdr kv) seed)) seed))
+  (fold (lambda (kv seed) (proc (car kv) (cdr kv) seed)) seed dict))
 
 (define-method dict-fold-right ((dict <ordered-dictionary>) proc seed)
-  (fold-right dict (^[kv seed] (proc (car kv) (cdr kv) seed)) seed))
+  (fold-right (^[kv seed] (proc (car kv) (cdr kv) seed)) seed dict))
 
 (define-method dict-map ((dict <dictionary>) proc)
   (reverse (dict-fold dict (^[k v s] (cons (proc k v) s)) '())))
2013/04/20 04:27:24 UTCyamasushi
#
diff --git a/doc/modgauche.texi b/doc/modgauche.texi
index b1fdb73..b65227c 100644
--- a/doc/modgauche.texi
+++ b/doc/modgauche.texi
@@ -2257,6 +2257,10 @@ takes a collection class argument and returns the collection of the class.
 @c COMMON
 @end deftp
 
+@deftp {Builtin Class} <collection>
+@clindex collection
+@end deftp
+
 @menu
 * Mapping over collection::
 * Selection and searching in collection::
@@ -3381,6 +3385,13 @@ built on top of other dictionary classes.
 @c COMMON
 @end deftp
 
+@deftp {Builtin Class} <dictionary>
+@clindex dictionary
+@end deftp
+@deftp {Builtin Class} <ordered-dictionary>
+@clindex ordered-dictionary
+@end deftp
+
 @menu
 * Generic functions for dictionaries::
 * Generic dictionaries::
@@ -11851,6 +11862,10 @@ Gauche組み込みクラスのうち、リスト、ベクター、そして文
 @c COMMON
 @end deftp
 
+@deftp {Builtin Class} <sequence>
+@clindex sequence
+@end deftp
+
 @menu
 * Fundamental sequence accessors::
 * Slicing sequence::
#
こんなかんじにクラス索引をつけてみました。
2013/04/20 10:57:04 UTCshiro
#
説明が自然にフィットするところに置かないとならないのでちょっと考えさせてください>クラス索引の位置