Skip to main content

code

Function code 

Source
fn code(
    input: &[&str],
    keypad: &str,
    start: Point,
    inside: impl Fn(Point) -> bool,
) -> String
Expand description

Follows the instructions with the keypad centered on the origin, pushing the key reached at the end of each line. Moves that leave the keypad are ignored.