Luciana Lima Brito <lubr...@posteo.net> writes:

> On Tue, 27 Apr 2021 13:10:01 +0000
> Luciana Lima Brito <lubr...@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?

Great :)

I'd go with this approach, applying the comments I made about the
match-lambda bit above in the email I sent a few minutes ago.

Attachment: signature.asc
Description: PGP signature

Reply via email to