Intersecting number wheels: Difference between revisions

m
Line 754:
def clockWorkTick(wheelMap):
'''The new state of the wheels, tupled with the
digit found, bothby resultingrecursive descent from a recursivesingle
descent from a single click of the first wheel.'''
wheel, terminating at the first digit found.'''
def click(wheels, name):
wheel = wheels.get(name, ['?'])
v = wheel[0]
return (Tuple if isDigit(v) or '?' == v else curry(click))(
insertDict(name)(leftRotate(wheel))(wheels)
leftRotate(wheel)
)(wheels)
)(v)
return click(wheelMap, 'A')
Line 779 ⟶ 780:
'''First twenty values from each set of test wheels.'''
 
print('New state of wheel sets, after 20 clicks of each:\n')
wheelMaps = [dict(kvs) for kvs in [
[('A', "123")],
Line 786:
[('A', "1BC"), ('B', "34"), ('C', "5B")]
]]
print('New state of wheel sets, after 20 clicks of each:\n')
for wheels, series in [
mapAccumL(compose(const)(clockWorkTick))(
9,655

edits