networks: Add a copy of lists-transpose.

I will remove this copy when I will have migrated networks to
Typed Racket.
This commit is contained in:
Sergiu Ivanov 2022-02-13 19:48:21 +01:00
parent 2af8d9276b
commit ec50395cb0

View file

@ -951,6 +951,14 @@
;;; Constructing functions and networks ;;; Constructing functions and networks
;;; =================================== ;;; ===================================
;;; TODO 2022-02-13: Remove when this module is completely migrated to
;;; Typed Racket.
;;;
;;; Typed Racket cannot generate the contract from the type of
;;; lists-transpose in utils. This is a copy of lists-transpose.
(define (lists-transpose lists)
(sequence->list (in-values-sequence (apply in-parallel lists))))
;;; Given a table like the one produced by tabulate-network, ;;; Given a table like the one produced by tabulate-network,
;;; constructs a Boolean network having this behaviour. If headers is ;;; constructs a Boolean network having this behaviour. If headers is
;;; #t, considers that the first element of the list are the headers ;;; #t, considers that the first element of the list are the headers