Skip to content

Commit 4763347

Browse files
authored
math/factorial: update deprecated approaches
1 parent deb4d00 commit 4763347

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
@@ -6,7 +6,7 @@ module Factorial =
66
if n < 0 then
77
failwith "No factorial for negative numbers"
88
else
9-
{ 1 .. n } |> Seq.fold (fun acc n -> acc * n) 1
9+
seq { 1 .. n } |> Seq.fold (fun acc n -> acc * n) 1
1010

1111
/// Calculates factorial. Time complexity: O(n)
1212
let byReduceFunction n =

0 commit comments

Comments
 (0)