mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Switch to <* *> docs. Fix issue with dynamically loaded C3 libs with other C3 code.
This commit is contained in:
committed by
Christoffer Lerno
parent
9f6a4eb300
commit
31cd839063
@@ -1,12 +1,12 @@
|
||||
module std::sort;
|
||||
|
||||
/**
|
||||
* Perform a binary search over the sorted array and return the index
|
||||
* in [0, array.len) where x would be inserted or cmp(i) is true and cmp(j) is true for j in [i, array.len).
|
||||
* @require @is_sortable(list) "The list must be sortable"
|
||||
* @require @is_valid_cmp_fn(cmp, list, context) "Expected a comparison function which compares values"
|
||||
* @require @is_valid_context(cmp, context) "Expected a valid context"
|
||||
**/
|
||||
<*
|
||||
Perform a binary search over the sorted array and return the index
|
||||
in [0, array.len) where x would be inserted or cmp(i) is true and cmp(j) is true for j in [i, array.len).
|
||||
@require @is_sortable(list) "The list must be sortable"
|
||||
@require @is_valid_cmp_fn(cmp, list, context) "Expected a comparison function which compares values"
|
||||
@require @is_valid_context(cmp, context) "Expected a valid context"
|
||||
*>
|
||||
macro usz binarysearch(list, x, cmp = EMPTY_MACRO_SLOT, context = EMPTY_MACRO_SLOT) @builtin
|
||||
{
|
||||
usz i;
|
||||
|
||||
Reference in New Issue
Block a user