haloumi-picus 0.5.6

Haloumi backend to the Picus Constraint Language.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::pcl::vars::VarStr;

use super::vars::VarKey;

pub fn mk_io<F, I, O, C>(count: usize, f: F, c: C) -> impl Iterator<Item = O>
where
    O: Into<VarKey> + Into<VarStr>,
    I: From<usize>,
    F: Fn(I, C) -> O + 'static,
    C: Copy,
{
    (0..count).map(move |i| f(i.into(), c))
}