[racket] Sweet expressions; or making it easier to introduce Racket to me and my coworkers :-)

From: Ismael Figueroa Palet (ifigueroap at gmail.com)
Date: Tue Jul 26 18:04:40 EDT 2011

+1

2011/7/26 Eric Tanter <etanter at dcc.uchile.cl>

> +1!
>
> -- Éric
>
>
> On Jul 26, 2011, at 9:30 PM, Casey Klein wrote:
>
> > On Mon, Jul 25, 2011 at 11:20 PM, David Van Horn <dvanhorn at ccs.neu.edu>
> 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
>
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users
>



-- 
Ismael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20110727/a568a6fd/attachment.html>

Posted on the users mailing list.