ferrite_session/internal/base/rec/functions.rs
1use super::{
2 traits::RecApp,
3 types::RecX,
4};
5
6pub fn fix<C, F>(x: F::Applied) -> RecX<C, F>
7where
8 C: Send + 'static,
9 F: Send + 'static,
10 F: RecApp<(RecX<C, F>, C)>,
11{
12 RecX { unfix: Box::new(x) }
13}
14
15pub fn unfix<C, F>(x: RecX<C, F>) -> F::Applied
16where
17 C: Send + 'static,
18 F: Send + 'static,
19 F: RecApp<(RecX<C, F>, C)>,
20{
21 *x.unfix.get_applied()
22}