On Mon, Jul 25, 2011 at 11:20 PM, David Van Horn <[email protected]> wrote: > > Cute! Thanks for the cool planet package. Here's a slightly larger example > using Redex, adapted from redex/examples/arithmetic.rkt: > > #lang planet asumu/sweet racket > require rename-in(redex [term quote]) > > define-language lang > e n > δ1(e) > δ2(e e) > δ1 √ add1 sub1 > δ2 + - * / > E hole > δ1(E) > δ2(e E) > δ2(E e) > n number > > define v > reduction-relation lang > { √(n) --> ,sqrt('n) } > { add1(n) --> ,add1('n) } > { sub1(n) --> ,sub1('n) } > { +(n_1 n_2) --> ,+('n_1 'n_2) } > { -(n_1 n_2) --> ,-('n_1 'n_2) } > { *(n_1 n_2) --> ,*('n_1 'n_2) } > { /(n_1 n_2) --> ,/('n_1 'n_2) } > > define -->_v > context-closure v lang E > > traces -->_v '-(*(√(36) /(1 2)) +(1 2)) >
If only Redex could typeset in this syntax :) _________________________________________________ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

