Re: [racket-users] Looking for suggestion on accumulating the paths of Graph from HtDP

2016-02-12 Thread Matthias Felleisen
On Feb 12, 2016, at 1:00 PM, liweijian wrote: > I just added missing parts as follows, it passed all the tests I wrote. Great. Use the force Liweijian -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop

Re: [racket-users] Looking for suggestion on accumulating the paths of Graph from HtDP

2016-02-12 Thread liweijian
在 2016年2月1日星期一 UTC+8上午1:41:51,Matthias Felleisen写道: > I think you may wish to read How to Design Programs. Here are something that > are missing: > > — data definitions (what’s a graph? what’s a path) > — signatures > — examples > — tests > > Once you supply those missing pieces, you will ma

Re: [racket-users] Looking for suggestion on accumulating the paths of Graph from HtDP

2016-01-31 Thread Matthias Felleisen
I think you may wish to read How to Design Programs. Here are something that are missing: — data definitions (what’s a graph? what’s a path) — signatures — examples — tests Once you supply those missing pieces, you will make much more progress. If you post those, we can also help you make

[racket-users] Looking for suggestion on accumulating the paths of Graph from HtDP

2016-01-30 Thread liweijian
HtDP taught us how to check if there exists path(s) from one node to another. I tried to implement accumulating all the paths between two nodes as: ```racket (define (find-paths origin dest G path) (cond [(equal? origin dest) (reverse (cons dest path))] [else (find-paths/all (neigh