Derive scalar changes and composition laws
This commit is contained in:
10 files changed
+527
-3
No files matched your search
+9
-1
@@ -34,8 +34,16 @@ let rec drop count items =
|
||||
|
||||
let contains value items = List.exists (fun item -> item = value) items
|
||||
|
||||
let index_of_char text character =
|
||||
let rec search index =
|
||||
if index >= String.length text then None
|
||||
else if text.[index] = character then Some index
|
||||
else search (index + 1)
|
||||
in
|
||||
search 0
|
||||
|
||||
let string_before_char text character =
|
||||
match String.index_opt text character with
|
||||
match index_of_char text character with
|
||||
| Some index -> String.sub text 0 index
|
||||
| None -> text
|
||||
|
||||
|
||||
Reference in new issue
Block a user