Skip to content

Commit 26c66c7

Browse files
authored
math/factorial: update deprecated approaches in byReduceFunction
1 parent 4763347 commit 26c66c7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Algorithms/Math/Factorial.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module Factorial =
1313
match n with
1414
| n when n < 0 -> failwith "No factorial for negative numbers"
1515
| 0 -> 1
16-
| n -> { 1 .. n } |> Seq.reduce (*)
16+
| n -> seq { 1 .. n } |> Seq.reduce (*)
1717

1818
/// Calculates factorial. Time complexity: O(n)
1919
let rec byRecursion n =

0 commit comments

Comments
 (0)