pub open spec fn fold_requires<A, B, F: FnMut(B, A) -> B>(
items: Seq<A>,
produces: Seq<bool>,
init: B,
f: F,
) -> boolExpand description
{
forall |bs: Seq<B>| {
(#[trigger] fold_prefix(items, produces, init, f, bs)
&& bs.len() - 1 < items.len() && produces[bs.len() - 1])
==> f.requires((bs.last(), items[bs.len() - 1]))
}
}