Skip to content

Commit

Permalink
Remove extra parenthesis when constructing List
Browse files Browse the repository at this point in the history
  • Loading branch information
sendyhalim committed Dec 27, 2016
1 parent 13066bc commit 90fe877
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/List.swift
Expand Up @@ -440,7 +440,7 @@ public struct List<Element> {
/// Returns a List of an infinite number of iteratations of applications of
/// a function to an initial value.
public static func iterate(_ f : @escaping (Element) -> Element, initial : Element) -> List<Element> {
return List((initial, self.iterate(f, initial: f(initial))))
return List(initial, self.iterate(f, initial: f(initial)))
}

/// Cycles a finite list into an infinite list.
Expand Down

0 comments on commit 90fe877

Please sign in to comment.