guix-devel
[Top][All Lists]
Advanced

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

Re: Outreachy - Guix Data Service: questions about improving the data fo


From: Luciana Lima Brito
Subject: Re: Outreachy - Guix Data Service: questions about improving the data for derivation comparisons.
Date: Tue, 27 Apr 2021 18:33:35 +0000

On Tue, 27 Apr 2021 13:10:01 +0000
Luciana Lima Brito <lubrito@posteo.net> wrote:
 
> > Maybe add another procedure that combines group-to-alist but
> > generates an alist with vectors as the values?
> > (group-to-alist/vector maybe).  

I did it! :)
It was so much simpler. I created a function
group-to-alist/vector, based on the previous function, to which I added
the map I was already using on the controller.scm for data-groups.

(define (group-to-alist/vector process lst)
  (map
   (match-lambda
     ((label args ...)
      `(,label . ,(list->vector args))))
   (group-to-alist process lst)))

The only change needed on the html.scm is to use vector->list in the
items, like this

(map
 (lambda (alist)
   ...
 (or (vector->list items) '()))

Please, tell me what you think is the best, this way or the other that
I sent earlier with the patch?


-- 
Best Regards,

Luciana Lima Brito
MSc. in Computer Science



reply via email to

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