File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -71,10 +71,10 @@ shortestDoorCodeLength ::
71
71
String {- ^ door code -} ->
72
72
Int {- ^ shortest button press count -}
73
73
shortestDoorCodeLength n str =
74
- minimum
75
- [ sum (map (shortestRobotCodeLength n) keys)
76
- | keys <- sequence ( route doorPad str)
77
- ]
74
+ sum
75
+ [ minimum (map (shortestRobotCodeLength n) keys)
76
+ | keys <- route doorPad str
77
+ ]
78
78
79
79
-- | The length of the shortest input sequence that enters the given
80
80
-- robot directional code via a given number of robot layers.
@@ -84,9 +84,9 @@ shortestRobotCodeLength ::
84
84
Int {- ^ shortest button press count -}
85
85
shortestRobotCodeLength = memo2 \ n str ->
86
86
if n == 0 then length str else
87
- minimum
88
- [ sum (map (shortestRobotCodeLength (n- 1 )) keys)
89
- | keys <- sequence ( route robotPad str)
87
+ sum
88
+ [ minimum (map (shortestRobotCodeLength (n - 1 )) keys)
89
+ | keys <- route robotPad str
90
90
]
91
91
92
92
-- | Find a list of steps needed to input a code on a pad. The inner
You can’t perform that action at this time.
0 commit comments