aboutsummaryrefslogtreecommitdiff
path: root/script.it/script_event/complete_path.ml
blob: 99dd6ae6ce59a6b639a0fa39209a056897d2bd09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
open StdLabels
module State = Script_state.State

type t = Outline.t

let update newPath state =
  let paths = List.map
      state.State.paths
      ~f:(fun line ->
          match Outline.(newPath.id = line.id) with
          | true -> newPath
          | false -> line) in
  { state with paths }