mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Change @return! syntax to require ":" after faults. Update all contracts to consistently use ":" before the description.
This commit is contained in:
@@ -2,9 +2,9 @@ module std::sort;
|
||||
|
||||
<*
|
||||
Returns true if list is sorted in either ascending or descending order.
|
||||
@require @is_sortable(list) "The list must be indexable and support .len or .len()"
|
||||
@require @is_valid_cmp_fn(cmp, list, ctx) "Expected a comparison function which compares values"
|
||||
@require @is_valid_context(cmp, ctx) "Expected a valid context"
|
||||
@require @is_sortable(list) : "The list must be indexable and support .len or .len()"
|
||||
@require @is_valid_cmp_fn(cmp, list, ctx) : "Expected a comparison function which compares values"
|
||||
@require @is_valid_context(cmp, ctx) : "Expected a valid context"
|
||||
*>
|
||||
macro bool is_sorted(list, cmp = EMPTY_MACRO_SLOT, ctx = EMPTY_MACRO_SLOT) @builtin
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user