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 | 7012 reads
|
Browse archives
Active forum topics |
Recent comments
6 weeks 15 hours ago
6 weeks 18 hours ago
6 weeks 19 hours ago
28 weeks 2 days ago
32 weeks 3 days ago
34 weeks 1 day ago
34 weeks 1 day ago
36 weeks 5 days ago
41 weeks 3 days ago
41 weeks 3 days ago