Re: Multiple-values SRFI Lassi Kortela 11 May 2020 11:04 UTC

> (define (lists->hash-table ks vs)
>    (unfold* (values ks vs)
>             (lambda (ks vs) (and (pair? ks) (pair? vs)))
>             (lambda (ks vs) (values (cdr ks) (cdr vs)))
>             (make-hash-table)
>             (lambda (hash-table k v)
>               (hash-table-set! hash-table k v)
>               hash-table)))

Sorry, it's missing the procedure to get the elements:

(lambda (ks vs) (values (car ks) (car vs))

Or maybe the accumulating procedure could be:

(lambda (hash-table ks vs)
   (hash-table-set! hash-table (car ks) (car vs))
   hash-table)