Skip to content

Commit 784ff41

Browse files
authored
ZipList implements IEnumerable's
1 parent 6032264 commit 784ff41

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/FSharpPlus/Data/ZipList.fs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ open FSharpPlus
55

66

77
/// A sequence with an Applicative functor based on zipping.
8-
[<NoEquality;NoComparison>]
8+
[<NoEquality; NoComparison>]
99
type ZipList<'s> = ZipList of 's seq with
1010
member this.Item n = let (ZipList s) = this in Seq.item n s
1111

12+
interface IEnumerable<'s> with member x.GetEnumerator () = (let (ZipList x) = x in x).GetEnumerator ()
13+
interface System.Collections.IEnumerable with member x.GetEnumerator () = (let (ZipList x) = x in x).GetEnumerator () :> System.Collections.IEnumerator
14+
1215
/// Basic operations on ZipList
1316
[<RequireQualifiedAccess>]
1417
module ZipList =

0 commit comments

Comments
 (0)