Better styling for utility
This commit is contained in:
@ -48,8 +48,8 @@ let int_not a =
|
||||
(* else if x < base then *)
|
||||
(* String.get alphabet x |> String.make 1 *)
|
||||
(* else *)
|
||||
(* (fromIntToString (alphabet) (x/base - 1)) ^ (String.get alphabet (x mod base) *)
|
||||
(* |> String.make 1) *)
|
||||
(* (fromIntToString (alphabet) (x/base - 1)) ^ *)
|
||||
(* (String.get alphabet (x mod base) |> String.make 1) *)
|
||||
|
||||
|
||||
(* true if every element of la is in lb *)
|
||||
@ -58,9 +58,7 @@ let inclusion la lb =
|
||||
function
|
||||
[] -> true
|
||||
| b::lb ->
|
||||
if List.mem b la
|
||||
then aux la lb
|
||||
else false
|
||||
List.mem b la && aux la lb
|
||||
in
|
||||
aux lb la
|
||||
|
||||
@ -127,9 +125,9 @@ let unique_union_assoc f l1 l2 =
|
||||
|
||||
(* returns a list with at most n items and the rest in the second *)
|
||||
let rec take (n: int) (l: 'a list) : ('a list * 'a list) =
|
||||
match n with
|
||||
| 0 -> ([], l)
|
||||
| n ->
|
||||
if n = 0
|
||||
then ([], l)
|
||||
else
|
||||
match l with
|
||||
| [] -> ([], [])
|
||||
| i::ls ->
|
||||
|
||||
Reference in New Issue
Block a user