From 38e70d3b21d07a172bd4d8e491006b405fc9388e Mon Sep 17 00:00:00 2001 From: Ludovic Court`es Date: Wed, 19 Jul 2006 09:19:25 +0000 Subject: compat: Optimized `hashtable->list'. * src/guile/skribilo/utils/compat.scm (hashtable->list): Optimized a bit. git-archimport-id: lcourtes@laas.fr--2005-libre/skribilo--devo--1.2--patch-11 --- src/guile/skribilo/utils/compat.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/guile/skribilo/utils/compat.scm b/src/guile/skribilo/utils/compat.scm index cf97258..d24dd6f 100644 --- a/src/guile/skribilo/utils/compat.scm +++ b/src/guile/skribilo/utils/compat.scm @@ -248,8 +248,8 @@ (hash-set! table key init-value) (set-cdr! handle (update-proc (cdr handle)))))) -(define-public hashtable->list (lambda (h) - (map cdr (hash-map->list cons h)))) +(define-public (hashtable->list h) + (hash-map->list (lambda (key val) val) h)) (define-public (find-runtime-type obj) (cond ((string? obj) "string") -- cgit v1.2.3