1
Fork 0

fsharp(ygosim): feat: added a helper to turn a list to indices and another one to check if a list contains an index

Signed-off-by: prescientmoon <git@moonythm.dev>
This commit is contained in:
Matei Adriel 2019-12-15 15:24:27 +02:00 committed by prescientmoon
parent e6dc6097f9
commit e5b9ed70c6
Signed by: prescientmoon
SSH key fingerprint: SHA256:UUF9JT2s8Xfyv76b8ZuVL7XrmimH4o49p4b+iexbVH4

View file

@ -9,6 +9,9 @@ module List =
let (.->) = setIndex
let toIndices list = List.mapi (fun i _ -> i) list
let containsIndex index list = index >= 0 && index < List.length list
module Lens =
open FSharpPlus.Lens