From 3f667b5f5916d2fef5e3f1e032b30c001afc402a Mon Sep 17 00:00:00 2001 From: Patrick McDonald Date: Fri, 1 Dec 2017 13:56:53 +0000 Subject: [PATCH] Remove unused mapFold and mapFoldBack functions (#4038) --- src/absil/illib.fs | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/absil/illib.fs b/src/absil/illib.fs index 976cc1ac2..b48b277a4 100644 --- a/src/absil/illib.fs +++ b/src/absil/illib.fs @@ -115,16 +115,6 @@ module Array = Array.length l1 = Array.length l2 && Array.forall2 p l1 l2 - let mapFold f s l = - let mutable acc = s - let n = Array.length l - let mutable res = Array.zeroCreate n - for i = 0 to n - 1 do - let h',s' = f acc l.[i] - res.[i] <- h'; - acc <- s' - res, acc - let order (eltOrder: IComparer<'T>) = { new IComparer> with member __.Compare(xs,ys) = @@ -449,15 +439,6 @@ module List = match l with | [] -> false | h::t -> LanguagePrimitives.PhysicalEquality x h || memq x t - - // Not tail recursive - let rec mapFoldBack f l s = - match l with - | [] -> ([],s) - | h::t -> - let t',s = mapFoldBack f t s - let h',s = f h s - (h'::t', s) let mapNth n f xs = let rec mn i = function -- GitLab