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:
parent
e6dc6097f9
commit
e5b9ed70c6
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue