MCPcopy Create free account
hub / github.com/digama0/lean-sys / lean_array_set

Function lean_array_set

src/array/high_level.rs:119–131  ·  view source on GitHub ↗
(
    a: lean_obj_arg,
    i: b_lean_obj_arg,
    v: lean_obj_arg,
)

Source from the content-addressed store, hash-verified

117
118#[inline]
119pub unsafe fn lean_array_set(
120 a: lean_obj_arg,
121 i: b_lean_obj_arg,
122 v: lean_obj_arg,
123) -> *mut lean_object {
124 if lean_is_scalar(i) {
125 let idx = lean_unbox(i);
126 if idx < lean_array_size(a) {
127 return lean_array_uset(a, idx, v);
128 }
129 }
130 lean_array_set_panic(a, v)
131}
132
133#[inline]
134pub unsafe fn lean_array_pop(a: lean_obj_arg) -> *mut lean_object {

Callers

nothing calls this directly

Calls 4

lean_is_scalarFunction · 0.85
lean_unboxFunction · 0.85
lean_array_sizeFunction · 0.85
lean_array_usetFunction · 0.85

Tested by

no test coverage detected