Live Variables
This commit is contained in:
@ -101,6 +101,11 @@ let unique_intersection la lb =
|
||||
aux la lb [] |> unique
|
||||
|
||||
|
||||
let drop_last_element_list =
|
||||
function
|
||||
| [] -> []
|
||||
| l -> l |> List.rev |> List.tl |> List.rev
|
||||
|
||||
(* Complicated way to drop the last element and add a new option element to the
|
||||
beginning *)
|
||||
let prev l a =
|
||||
@ -108,7 +113,7 @@ let prev l a =
|
||||
| [] ->
|
||||
[a]
|
||||
| _ ->
|
||||
a :: (List.map (fun x -> Some x) (l |> List.rev |> List.tl |> List.rev))
|
||||
a :: (List.map (fun x -> Some x) (drop_last_element_list l))
|
||||
|
||||
let pad l a n =
|
||||
let l = List.map (fun i -> Some i) l in
|
||||
|
||||
Reference in New Issue
Block a user