mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 13:58:15 -05:00
vm: Use 'fold2' from (guix combinators).
* gnu/build/vm.scm: Use (guix combinators). (fold2): Remove.
This commit is contained in:
parent
a8ac4f081a
commit
a2278922fe
1 changed files with 1 additions and 12 deletions
|
@ -27,6 +27,7 @@ (define-module (gnu build vm)
|
||||||
#:use-module (gnu build linux-boot)
|
#:use-module (gnu build linux-boot)
|
||||||
#:use-module (gnu build install)
|
#:use-module (gnu build install)
|
||||||
#:use-module (guix records)
|
#:use-module (guix records)
|
||||||
|
#:use-module ((guix combinators) #:select (fold2))
|
||||||
#:use-module (ice-9 format)
|
#:use-module (ice-9 format)
|
||||||
#:use-module (ice-9 match)
|
#:use-module (ice-9 match)
|
||||||
#:use-module (ice-9 regex)
|
#:use-module (ice-9 regex)
|
||||||
|
@ -157,18 +158,6 @@ (define (estimated-partition-size graphs)
|
||||||
;; Simply add a 20% overhead.
|
;; Simply add a 20% overhead.
|
||||||
(round (* 1.2 (closure-size graphs))))
|
(round (* 1.2 (closure-size graphs))))
|
||||||
|
|
||||||
(define (fold2 proc seed1 seed2 lst) ;TODO: factorize
|
|
||||||
"Like `fold', but with a single list and two seeds."
|
|
||||||
(let loop ((result1 seed1)
|
|
||||||
(result2 seed2)
|
|
||||||
(lst lst))
|
|
||||||
(if (null? lst)
|
|
||||||
(values result1 result2)
|
|
||||||
(call-with-values
|
|
||||||
(lambda () (proc (car lst) result1 result2))
|
|
||||||
(lambda (result1 result2)
|
|
||||||
(loop result1 result2 (cdr lst)))))))
|
|
||||||
|
|
||||||
(define* (initialize-partition-table device partitions
|
(define* (initialize-partition-table device partitions
|
||||||
#:key
|
#:key
|
||||||
(label-type "msdos")
|
(label-type "msdos")
|
||||||
|
|
Loading…
Reference in a new issue