MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / seq_lt_d

Method seq_lt_d

compiler/src/modules/vm/ops.rs:388–395  ·  view source on GitHub ↗
(&self, xs: &[Val], ys: &[Val], depth: usize)

Source from the content-addressed store, hash-verified

386 }
387
388 fn seq_lt_d(&self, xs: &[Val], ys: &[Val], depth: usize) -> Result<bool, VmErr> {
389 if depth > CMP_DEPTH_MAX { return Err(cold_depth()); }
390 for (&x, &y) in xs.iter().zip(ys.iter()) {
391 if eq_vals_with_heap(x, y, &self.heap) { continue; }
392 return self.lt_vals_d(x, y, depth + 1);
393 }
394 Ok(xs.len() < ys.len())
395 }
396
397 /* Item presence in list/tuple/dict/set, or substring in string. Non-iterable container raises TypeError. */
398 pub fn contains(&self, container: Val, item: Val) -> Result<bool, VmErr> {

Callers 2

lt_vals_dMethod · 0.80
seq_ltMethod · 0.80

Calls 5

cold_depthFunction · 0.85
eq_vals_with_heapFunction · 0.85
lt_vals_dMethod · 0.80
iterMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected