We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ffcb23 commit 6a3a85bCopy full SHA for 6a3a85b
src/FSharpPlus/Data/DList.fs
@@ -64,10 +64,11 @@ type DList<'T> (length: int, data: DListData<'T>) =
64
// and so is more appropriately implemented under the foldBack signature
65
// See http://stackoverflow.com/questions/5324623/functional-o1-append-and-on-iteration-from-first-element-list-data-structure/5334068#5334068
66
static member foldBack (f: 'T -> 'State -> 'State) (l: DList<'T>) (state: 'State) =
67
+ let f = OptimizedClosures.FSharpFunc<_, _, _>.Adapt f
68
let rec walk lefts l xs =
69
match l with
70
| Nil -> finish lefts xs
- | Unit x -> finish lefts <| f x xs
71
+ | Unit x -> finish lefts <| f.Invoke (x, xs)
72
| Join (x, y) -> walk (x::lefts) y xs
73
and finish lefts xs =
74
match lefts with
0 commit comments