Re: [racket] Matching patterns of two function

2012-12-02 Thread J. Ian Johnson
] Matching patterns of two function Thanks a lot. But I want to test equality of two functions by comparing their call-graphs. If you know, plz tell me? How to construct call-graph of functions. Racket Users list: http://lists.racket-lang.org/users Racket

Re: [racket] Matching patterns of two function

2012-12-02 Thread Mohammad Mustaqeem
Thanks a lot. But I want to test equality of two functions by comparing their call-graphs. If you know, plz tell me? How to construct call-graph of functions. Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Matching patterns of two function

2012-11-30 Thread Matthias Felleisen
Do you mean pattern as in -- substitution -- unification In this particular case, you could synthesize the pattern > (define (FFF l) > (cond[(empty? l)0] >[else (+ (XXX l) (FFF (cdr l)))])) and then claim that -- sum = FFF with XXX = first -- length = FFF with XXX = (K 1)

Re: [racket] Matching patterns of two function

2012-11-30 Thread Jos Koot
What you are asking for seems like alpha congruence, but less restrictive. How much less restrictive? That depends on you definition of "the same pattern". In length you have "(car l)" and in length you have "1". Do they have the same structure? That, of course depends on the definition of car (it