Skip to content

Commit 8d3003d

Browse files
authored
Fix Free.map3
1 parent 0e93ae9 commit 8d3003d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/FSharpPlus/Data/Free.fs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ module Free =
6262
loop y x
6363

6464
let inline map3 (f: 'T->'U->'V->'W) (x: Free<'``Functor<'T>``,'T>) (y: Free<'``Functor<'U>``,'U>) (z: Free<'``Functor<'V>``,'V>) : Free<'``Functor<'W>``,'W> =
65-
let rec loop (y: Free<_,_>) (x: Free<_,_>) (z: Free<_,_>) =
65+
let rec loop (y: Free<_,_>) (z: Free<_,_>) (x: Free<_,_>) =
6666
match run x with
67-
| Pure x -> map2<'U,'V,'W,'``Functor<'U>``,'``Functor<Free<'Functor<'U>,'U>>``,'``Functor<Free<'Functor<'V>,'V>>``,'``Functor<Free<'Functor<'W>,'W>>``,'``Functor<'V>``,'``Functor<'W>``> (f x) y z : Free<'``Functor<'W>``,'W>
68-
| Roll (x: ^``Functor<Free<'Functor<'T>,'T>>``) -> Roll (Map.Invoke (loop y: Free<'``Functor<'T>``,'T> -> _) x: '``Functor<Free<'Functor<'W>,'W>>``)
69-
loop y x z
67+
| Pure x -> map2<'U,'V,'W,'``Functor<'U>``,'``Functor<Free<'Functor<'U>,'U>>``,'``Functor<Free<'Functor<'W>,'W>>``,'``Functor<Free<'Functor<'V>,'V>>``,'``Functor<'V>``,'``Functor<'W>``> (f x) y z : Free<'``Functor<'W>``,'W>
68+
| Roll (x: ^``Functor<Free<'Functor<'T>,'T>>``) -> Roll (Map.Invoke (loop y z: Free<'``Functor<'T>``,'T> -> _) x: '``Functor<Free<'Functor<'W>,'W>>``)
69+
loop y z x
7070

7171
/// Folds the Free structure into a Monad
7272
let inline fold (f: '``Functor<'T>`` -> '``Monad<'T>``) (x: Free<'``Functor<'U>``,'U>) : '``Monad<'U>`` =
@@ -105,4 +105,4 @@ type Free<'``functor<'t>``,'t> with
105105

106106
static member Delay (x: unit -> Free<'``Functor<'T>``,'T>) = x ()
107107

108-
#endif
108+
#endif

0 commit comments

Comments
 (0)