Skip to content

Commit

Permalink
Fix List.lift3
Browse files Browse the repository at this point in the history
  • Loading branch information
gusty authored Jan 28, 2024
1 parent c3b0227 commit e2926a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/FSharpPlus/Extensions/List.fs
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ module List =
/// <param name="x3">Third list.</param>
///
/// <returns>List with values returned from mapping function.</returns>
let lift3 f x1 x2 x3 =
#if !FABLE_COMPILER || FABLE_COMPILER_3 || FABLE_COMPILER_4
let lift3 (f: 'T1 -> 'T2 -> 'T3 -> 'U) (x1: list<'T1>) (x2: list<'T2>) (x3: list<'T3>) =
#if FABLE_COMPILER
List.allPairs x2 x3
|> List.allPairs x1
|> List.map (fun x -> (fst (snd x), snd (snd x), fst x))
|> List.map (fun (x, y, z) -> f x y z)
|> List.map (fun (x, y, z) -> f z x y)
#else
let mutable coll = ListCollector<'U> ()
x1 |> List.iter (fun x1 ->
Expand Down

0 comments on commit e2926a6

Please sign in to comment.