I'd like to change the result of a 0-arity function, but I need help
crafting the right magic spell. Here's my attempt -- this even possible?


#lang racket/base

(struct wrap (vals)) ;; Wrap a list
(define (create) '())

(define create-wrap
  (impersonate-procedure create
    (lambda ()
      ;;(values)))) ;; -- this will run, but it doesn't wrap the result
like I'd like.
      (values (lambda (r) (wrap r))
              (values)))))

(create-wrap) ;; Error! result arity mismatch: expected 1, got 0.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to