add values
parent
ccbdb60ddf
commit
ad72822c04
@ -0,0 +1,13 @@
|
|||||||
|
#lang racket/base
|
||||||
|
(require (for-syntax racket/base))
|
||||||
|
|
||||||
|
(provide (all-defined-out))
|
||||||
|
|
||||||
|
(define-syntax (values->list stx)
|
||||||
|
(syntax-case stx ()
|
||||||
|
[(_ values-expr) #'(call-with-values (λ () values-expr) list)]))
|
||||||
|
|
||||||
|
|
||||||
|
(define-syntax (apply-values stx)
|
||||||
|
(syntax-case stx ()
|
||||||
|
[(_ proc values) #'(apply proc (values->list values))]))
|
Loading…
Reference in New Issue