Skip to content

Instantly share code, notes, and snippets.

@schuster
Created June 5, 2013 20:04
Show Gist options
  • Save schuster/5716842 to your computer and use it in GitHub Desktop.
Save schuster/5716842 to your computer and use it in GitHub Desktop.
Demonstration of a custom reduction strategy (apply-reduction-relation*/random)
#lang racket
(require redex)
(define (apply-reduction-relation*/random rel t)
(define results (apply-reduction-relation rel t))
(cond [(null? results) (list t)]
[else (apply-reduction-relation*/random rel (list-ref results (random (length results))))]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment