RosettaCodeData/Task/Nested-function/SuperCollider/nested-function.sc

13 lines
208 B
Scala

(
f = { |separator|
var count = 0;
var counting = { |name|
count = count + 1;
count.asString ++ separator + name ++ "\n"
};
counting.("first") + counting.("second") + counting.("third")
};
)
f.(".")