Added 3 examples to roundcorners.

Added doc text for list_increasing and list_decreasing.
Added str_match, str_matches, starts_width, ends_width.
Fixed substr to use tail recursion.
This commit is contained in:
Adrian Mariano
2019-06-22 13:33:49 -04:00
parent 2886cd907b
commit 60be226e85
3 changed files with 150 additions and 8 deletions

View File

@@ -240,12 +240,18 @@ function list_insert(list, pos, elements) =
);
// True if the list is (non-strictly) increasing
// Function: list_increasing()
// Usage:
// list_increasing(list)
// Description: returns true if the list is (non-strictly) increasing
function list_increasing(list,ind=0) = ind < len(list)-1 && list[ind]<=list[ind+1] ? list_increasing(list,ind+1) :
(ind>=len(list)-1 ? true : false);
// True if the list is (non-strictly) decreasing
// Function: list_decreasing()
// Usage:
// list_increasing(list)
// Description: returns true if the list is (non-strictly) decreasing
function list_decreasing(list,ind=0) = ind < len(list)-1 && list[ind]>=list[ind+1] ? list_increasing(list,ind+1) :
(ind>=len(list)-1 ? true : false);