User loginNavigation |
Elegant Method of binding a function variableI'm trying to bring myself up to speed on LISP/Scheme and am having one of those days when my brain cell has migrated to another dimension. I have the following code(given in Scheme): (begin The first print will return 7, the second 6. What I want is for the x in incx to be permanently bound to the first definition (5), so that I get 7 in both calls to incs. I can do it by assigning x to another name (_x, say) and using that, but I would like a more elegant method of doing it - particularly one that doesn't involve creating an alternative name. All ideas gratefully received. Stuart By StuartBruff at 2005-11-03 12:43 | LtU Forum | previous forum topic | next forum topic | other blogs | 7083 reads
|
Browse archives
Active forum topics |
Recent comments
22 weeks 6 days ago
22 weeks 6 days ago
22 weeks 6 days ago
45 weeks 19 hours ago
49 weeks 2 days ago
50 weeks 6 days ago
50 weeks 6 days ago
1 year 1 week ago
1 year 6 weeks ago
1 year 6 weeks ago