mirror of
https://github.com/Smaug123/WoofWare.PawPrint
synced 2025-10-11 16:48:41 +00:00
13 lines
312 B
Forth
13 lines
312 B
Forth
namespace WoofWare.PawPrint
|
|
|
|
[<RequireQualifiedAccess>]
|
|
module List =
|
|
let replaceWhere (f : 'a -> 'a option) (l : 'a list) : 'a list =
|
|
([], l)
|
|
||> List.fold (fun acc x ->
|
|
match f x with
|
|
| None -> x :: acc
|
|
| Some y -> y :: acc
|
|
)
|
|
|> List.rev
|