bug-kawa
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-kawa] [bug #36853] Propagate type parameters


From: Helmut Eller
Subject: [Bug-kawa] [bug #36853] Propagate type parameters
Date: Tue, 17 Jul 2012 07:57:15 +0000
User-agent: Opera/9.80 (X11; Linux i686; U; en) Presto/2.10.289 Version/12.00

Follow-up Comment #2, bug #36853 (project kawa):

>The code doesn't support wildcards yet. Perhaps you could come 
>with some testcases using wildcards?

You mean something like this?

(define (map->alist (m java.util.Map))
  (let* ((entries (m:entrySet))
         (iter (entries:iterator)))
    (let loop ((alist '()))
      (if (iter:hasNext)
          (let ((entry (iter:next)))
            (loop (cons (cons (entry:getKey) (entry:getValue))
                        alist)))
          alist))))

(equal? (map->alist (java.util.Collections:singletonMap 'a 1))
        '((a . 1)))



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?36853>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]