Re:Learning Parser Combinators with Rust
by Rusky on Friday April 19, 2019 @02:48PM
(#19701964)
Re: your edit, isn't mutating the `&str` exactly what we're doing? Your new diagram implies that `input` itself is mutable and that's what's being overwritten, but that's not what `input: &mut &str` means nor would it even work because the mutation wouldn't be visible to the caller...?
[ Parent
| on HN ]
Re:Learning Parser Combinators with Rust
by steveklabnik on Friday April 19, 2019 @03:05PM
(#19702110)
.... uuuuugh dammit you are correct. Thanks. I can't mutate the parent post, sadly, so have an upvote and hopefully you sit at the top.
I did draw the right thing at first, then convinced myself I was wrong and "fixed" it. Tricky!