MCPcopy Create free account
hub / github.com/argumentcomputer/ix / cheap_beta_overapplied_appends_remaining

Function cheap_beta_overapplied_appends_remaining

crates/kernel/src/subst.rs:1269–1281  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1267 // Inside the lambda, Var(0) is still bound, Var(1) becomes fv0.
1268 let expected = AE::lam((), (), nat, AE::app(AE::var(0, ()), fv0));
1269 assert_eq!(result, expected);
1270 }
1271
1272 // ---- abstract_fvars ----
1273
1274 #[test]
1275 fn abstract_fvars_empty_passthrough() {
1276 let mut env = InternTable::<Anon>::new();
1277 let v0 = AE::var(0, ());
1278 let result = abstract_fvars(&mut env, &v0, &[]);
1279 assert!(result.ptr_eq(&v0));
1280 }
1281
1282 #[test]
1283 fn abstract_fvars_no_fvars_shifts_loose_bvar() {
1284 let mut env = InternTable::<Anon>::new();

Callers

nothing calls this directly

Calls 7

cheap_beta_reduceFunction · 0.85
cnstFunction · 0.70
mk_addrFunction · 0.70
varFunction · 0.70
lamFunction · 0.70
appFunction · 0.70
cloneMethod · 0.45

Tested by

no test coverage detected