Function quil_rs::program::map_parsed
source · pub fn map_parsed<O, O2>(
result: Result<O, ProgramError<O>>,
map: impl Fn(O) -> O2
) -> Result<O2, ProgramError<O2>>
Expand description
Map the parsed output into another value.
This should be preferred over Result::map
, as this will map both the Ok
case and when
there is a [LeftoverError
].