algorithm - Scheme How To Return Multiple Values? -
I've noticed that almost all scheme jobs can be returned only as a list output. In the following, I would like to return many values of all adjacent nodes of the neighbors. (defined neighbor LW) (if (and (= 1l) (= 1w)) (list (and (L (+ 1W)) (and (+ 1l) W)))); How to output 2 or more values? In this case, I am testing for the first time if the node is in the corner, if so, then return 2 values of coordinates where (L and W + 1), (L + 1 and W)) Basically if I (1, 1) return me (1,2) (1,2) and (2,1) apply only when the edge of the node Has only one neighbor, in this case I have 3 values When there is no increase, then I will have 4 returns. I I tried opposition, attachment , Su I do not want to work with any of the additional values. I need a sub-function. How should I implement it so that I can pass the return value and return all the adjacent nodes Can I reuse it for? Edit : I got the answer: The keyword " value " to return multiple values Examp...