9 lines
329 B
Plaintext
9 lines
329 B
Plaintext
fcn makeList(separator){
|
|
counter:=Ref(1); // a container holding a one. A reference.
|
|
// 'wrap is partial application, in this case binding counter and separator
|
|
makeItem:='wrap(item){ c:=counter.inc(); String(c,separator,item,"\n") };
|
|
makeItem("first") + makeItem("second") + makeItem("third")
|
|
}
|
|
|
|
print(makeList(". "));
|