diff options
Diffstat (limited to 'src/State.ml')
-rw-r--r-- | src/State.ml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/State.ml b/src/State.ml index cc20b16..59391d2 100644 --- a/src/State.ml +++ b/src/State.ml @@ -59,3 +59,14 @@ let from_string str = ("", [| |], [| |]) (Js.Array.from (Js.String.castToArrayLike ((String.decode str) ^ sep))) in res + +(* Colors *) + +let colors = + Js.Array.reduce + (fun colors marker -> + if Js.Array.indexOf marker.color colors == -1 then + Js.Array.concat [| marker.color |] colors + else + colors) + [| |] |