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 | 7163 reads
|
Browse archives
Active forum topics |
Recent comments
1 week 1 day ago
41 weeks 3 days ago
41 weeks 3 days ago
41 weeks 3 days ago
1 year 11 weeks ago
1 year 15 weeks ago
1 year 17 weeks ago
1 year 17 weeks ago
1 year 20 weeks ago
1 year 24 weeks ago