Skip to content

Commit e5441e8

Browse files
authored
math/power: update deprecated approaches
1 parent b8cf2e9 commit e5441e8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Algorithms/Math/Power.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module Power =
44
/// Calculates x^n. Time complexity: O(√n).
55
let byFoldFunction x n =
6-
{ 1 .. n } |> Seq.fold (fun acc _ -> acc * x) 1
6+
seq { 1 .. n } |> Seq.fold (fun acc _ -> acc * x) 1
77

88
/// Calculates x^n. x and n can be negative.
99
/// Time complexity O(n).

0 commit comments

Comments
 (0)