Hacker News new | past | comments | ask | show | jobs | submit login

I copy your code below, because it's so terse and marvellous and I don't want to deprive anyone who assumes otherwise and doesn't click on your link:

    : >BRACES       1 CELLS BRACES +!  BRACES @ ! ;
    : BRACES>       BRACES @ @  -1 CELLS BRACES +! ;
    : {             DEPTH >BRACES ;
    : }             DEPTH  BRACES> 1+  <> ABORT"unbalanced" ;
And the example "backwards lisp" expressions you give as test cases:

        { 1 2 + } .
        { 5 { 1 2 + } * }



Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: