From 0003516d9d9532fff4278f574de76cafeff7289b Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Thu, 10 Mar 2016 23:29:14 +0000 Subject: [PATCH] random-instance --- prospect/random-test.rkt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/prospect/random-test.rkt b/prospect/random-test.rkt index cd566fd..4d155d5 100644 --- a/prospect/random-test.rkt +++ b/prospect/random-test.rkt @@ -14,7 +14,8 @@ check-property* check-property reject-test - ==>) + ==> + random-instance) (require racket/match) (require rackunit) @@ -130,3 +131,6 @@ (define-syntax-rule (==> precondition expr) (if (not precondition) (reject-test) expr)) + +(define (random-instance e) + (from-nat e (random-index e)))