utils.rkt: Add a comment about an alternative implementation of lists-transpose.
This commit is contained in:
parent
87c80bb6ef
commit
6679db9aa4
1 changed files with 3 additions and 0 deletions
|
@ -447,6 +447,9 @@
|
|||
(check-equal? l1 '((1 2) (a b))) (check-equal? l2 '((3) (c)))))
|
||||
|
||||
;; https://racket.discourse.group/t/get-to-type-apply-in-parallel-lst/683
|
||||
;;
|
||||
;; Same thread: (apply ((curry map) list) lsts), however I don't
|
||||
;; feel like typing this right now (2022-02-18).
|
||||
(: lists-transpose (All (a ...) (-> (List (Listof a) ... a) (Listof (List a ... a)))))
|
||||
(define (lists-transpose lists)
|
||||
(sequence->list (in-values-sequence (apply in-parallel lists))))
|
||||
|
|
Loading…
Reference in a new issue