mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
Improved comment
This commit is contained in:
parent
257cb88511
commit
379235fd7e
1 changed files with 4 additions and 7 deletions
|
@ -980,13 +980,10 @@ where
|
||||||
index_alloca
|
index_alloca
|
||||||
}
|
}
|
||||||
|
|
||||||
// In many cases we dont want to do anything if the
|
// This function checks if the list is empty, and
|
||||||
// builtin was given an empty list. This is because
|
// if it is, it returns an empty list, and if not
|
||||||
// allocating memory for a list is costly, so its
|
// it runs whatever code is passed in under `build_non_empty`
|
||||||
// better to skip if it we can. Furthermore, checking
|
// This is the avoid allocating memory if the list is empty.
|
||||||
// if a list is empty requires both seeing if the list
|
|
||||||
// is a NonEmpty layout and if its a List(elem_layout)
|
|
||||||
// but with a length of 0.
|
|
||||||
fn if_list_is_not_empty<'a, 'ctx, 'env, 'b, NonEmptyFn>(
|
fn if_list_is_not_empty<'a, 'ctx, 'env, 'b, NonEmptyFn>(
|
||||||
env: &Env<'a, 'ctx, 'env>,
|
env: &Env<'a, 'ctx, 'env>,
|
||||||
parent: FunctionValue<'ctx>,
|
parent: FunctionValue<'ctx>,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue