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 | 7170 reads
|
Browse archives
Active forum topics |
Recent comments
3 weeks 5 days ago
44 weeks 16 hours ago
44 weeks 20 hours ago
44 weeks 20 hours ago
1 year 14 weeks ago
1 year 18 weeks ago
1 year 20 weeks ago
1 year 20 weeks ago
1 year 22 weeks ago
1 year 27 weeks ago