diff --git a/fsharp/ygosim/src/Utils.fs b/fsharp/ygosim/src/Utils.fs new file mode 100644 index 0000000..f241924 --- /dev/null +++ b/fsharp/ygosim/src/Utils.fs @@ -0,0 +1,7 @@ +module Utils + +module List = + let setIndex index value list = + List.mapi (fun previous i -> + if i = index then value + else previous) diff --git a/fsharp/ygosim/ygosim.fsproj b/fsharp/ygosim/ygosim.fsproj index 740adef..c11ddef 100644 --- a/fsharp/ygosim/ygosim.fsproj +++ b/fsharp/ygosim/ygosim.fsproj @@ -5,6 +5,7 @@ netcoreapp3.0 +