Commits

Anonymous committed 9c9c1fe

renames

Comments (0)

Files changed (3)

       | Chunk c ->
           match S.break_limit ~limit:left pred c with
           [ `Found (prefix, rest) ->
-              ret `Found (SC.append sc prefix) (Chunk rest)
+              ret `Found (SC.snoc sc prefix) (Chunk rest)
               (* not copying here, since [ret->sub_copy_out] will copy *)
           | `Hit_limit ->
               let (prefix, rest) = S.split_at left c in
-              step ~sc:(SC.append sc prefix) ~left:0 (Chunk rest)
+              step ~sc:(SC.snoc sc prefix) ~left:0 (Chunk rest)
               (* not copying here, since [step->ret->sub_copy_out] will copy *)
           | `Hit_end ->
               ie_contM &
                 step
-                  ~sc:(SC.append sc (S.copy c))
+                  ~sc:(SC.snoc sc (S.copy c))
                   ~left:(left - S.length c)
           ]
       ]
 value make lst = make_of_array & Array.of_list lst
 ;
 
-value (append_array : array 'a -> 'a -> array 'a) src s =
-  let src_len = Array.length src in
-  Array.init (src_len + 1) & fun i ->
-    if i = src_len
+value (snoc_array : array 'a -> 'a -> array 'a) sc s =
+  let sc_len = Array.length sc in
+  Array.init (sc_len + 1) & fun i ->
+    if i = sc_len
     then s
-    else src.(i)
+    else sc.(i)
 ;
 
-value append src s =
-  make_of_array & append_array src s
+value snoc sc s =
+  make_of_array & snoc_array sc s
 ;
 
 value length sc =
    subarrays [sc] into freshly created subarray. *)
 value sub_copy_out : ?ofs:int -> ?len:int -> t 'a -> Subarray.t 'a;
 
-(* [append sc s] appends subarray [s] to the end of
+(* [snoc s] appends subarray [s] to the end of
    concatenated subarrays [sc].
 *)
-value append : t 'a -> Subarray.t 'a -> t 'a;
+value snoc : t 'a -> Subarray.t 'a -> t 'a;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.