Re: [Gauche-devel] bimap not really a collection?
R7RS Scheme scripting engine
Status: Beta
Brought to you by:
shirok
|
From: Shiro K. <sh...@la...> - 2010-07-29 20:18:09
|
From: Jens Thiele <ka...@be...> Subject: [Gauche-devel] bimap not really a collection? Date: Thu, 29 Jul 2010 19:26:18 +0200 > is the following a bug? Yes, indeed. Seems that I just overlooked it. Will fix. --shiro > > gosh> (use gauche.dictionary) > #<undef> > gosh> (use gauche.collection) > #<undef> > gosh> (is-a? (make-bimap (make-hash-table 'string=?) (make-hash-table 'eqv?)) <collection>) > #t > gosh> (d (class-of (make-bimap (make-hash-table 'string=?) (make-hash-table 'eqv?)))) > #<class <bimap>> is an instance of class <class> > slots: > name : <bimap> > cpl : (#<class <bimap>> #<class <dictionary>> #<class <collection> > direct-supers: (#<class <dictionary>> #<class <object>>) > accessors : ((left . #<slot-accessor <bimap>.left 0 :left>) (right . #<s > slots : ((left :init-keyword :left) (right :init-keyword :right)) > direct-slots: ((left :init-keyword :left) (right :init-keyword :right)) > num-instance-slots: 2 > direct-subclasses: () > direct-methods: (#<method (dict-fold <bimap> <top> <top>)> #<method (dict-de > initargs : (:name <bimap> :supers (#<class <dictionary>>) :slots ((left > defined-modules: (#<module gauche.dictionary>) > redefined : #f > category : scheme > gosh> (fold (lambda _ #t) #f (make-bimap (make-hash-table 'string=?) (make-hash-table 'eqv?))) > *** ERROR: no applicable method for #<generic call-with-iterator (6)> with arguments (#<<bimap> 0x9691c0> #<closure ((fold <top> <top> <collection>) #f)>) > > real world context is that one: > > gosh> (define-method col-empty? ((col <collection>)) > #?=(call/cc > (lambda(cc) > (fold (lambda _ (cc #f)) > #t > col)))) > > #<generic col-empty? (1)> > gosh> (col-empty? (make-bimap (make-hash-table 'string=?) (make-hash-table 'eqv?))) > #?="(stdin)":7:(call/cc (lambda (cc) (fold (lambda _ (cc #f)) #t col))) > *** ERROR: no applicable method for #<generic call-with-iterator (6)> with arguments (#<<bimap> 0x969ea0> #<closure ((fold <top> <top> <collection>) #f)>) > Stack Trace: > _______________________________________ > 0 (call/cc (lambda (cc) (fold (lambda _ (cc #f)) #t col))) > At line 7 of "(stdin)" > > ------------------------------------------------------------------------------ > The Palm PDK Hot Apps Program offers developers who use the > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > of $1 Million in cash or HP Products. Visit us here for more details: > http://p.sf.net/sfu/dev2dev-palm > _______________________________________________ > Gauche-devel mailing list > Gau...@li... > https://lists.sourceforge.net/lists/listinfo/gauche-devel |