I donβt know if there is a commonly used library that contains functions such as a product, combinations and permutations, but the others you mentioned are already in the Seq and List modules or can be implemented without any problems, and there are also useful methods in System.Linq.Enumerable .
takewhile β Seq.takeWhiledropwhile β Seq.skipWhilechain β Seq.concatrepeat β Seq.initInfinitecount(10) β Seq.initInfinite ((+) 10)cycle([1, 2, 3]) β Seq.concat <| Seq.initInfinite (fun _ -> [1; 2; 3]) Seq.concat <| Seq.initInfinite (fun _ -> [1; 2; 3])
You can also check out the excellent FSharpx library - it contains many useful functions for working with collections and something else.
source share