Fixed issue #12

This commit is contained in:
Erin 2022-09-14 21:46:17 +02:00 committed by ondra05
parent e674052942
commit d004955c4e

View file

@ -523,18 +523,23 @@ impl<H: HostInterface> ExecEnv<H> {
.take(n_alternations) .take(n_alternations)
.map(|chunk| ValueRef::clone(&chunk[0])) .map(|chunk| ValueRef::clone(&chunk[0]))
.chain( .chain(
args[2 * n_alternations..] args.get(2 * n_alternations..)
.iter() .iter()
.copied()
.flatten()
.map(ValueRef::clone) .map(ValueRef::clone)
.take(extra_l), .take(extra_l),
) )
.collect(), .collect(),
args.chunks(2) args.chunks(2)
.take(n_alternations) .take(n_alternations)
.map(|chunk| ValueRef::clone(&chunk[1])) .flat_map(|chunk| chunk.get(1))
.map(ValueRef::clone)
.chain( .chain(
args[2 * n_alternations..] args.get(2 * n_alternations..)
.iter() .iter()
.copied()
.flatten()
.map(ValueRef::clone) .map(ValueRef::clone)
.take(extra_r), .take(extra_r),
) )