RosettaCodeData/Task/Intersecting-number-wheels/Zkl/intersecting-number-wheels-2.zkl
2023-07-01 13:44:08 -04:00

9 lines
409 B
Text

wheelSets:=T( Dictionary("A",T(1,2,3)),
Dictionary("A",T(1,"B",2), "B",T(3,4)),
Dictionary("A",T(1,"D","D"), "D",T(6,7,8)),
Dictionary("A",T(1,"B","C"), "C",T(5,"B"), "B",T(3,4)) );
foreach ws in (wheelSets){
println("Wheel set:");
ws.pump(String,fcn([(k,v)]){ " %s: %s\n".fmt(k,v.concat(" ")) }).print();
println("-->",intersectingNumberWheelsW(ws).walk(20).concat(" "));
}