Skip to content

Commit 9fa0955

Browse files
authored
Update LuhnAlgoLazy.swift
1 parent 359ec26 commit 9fa0955

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

benchmark/single-source/LuhnAlgoLazy.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,11 @@ let combineDoubleDigits = {
222222
// first, the lazy version of checksum calculation
223223
let lazychecksum = { (ccnum: String) -> Bool in
224224
ccnum.lazy
225-
|> reverse
226-
|> { mapSome($0, charToInt) }
227-
|> { mapEveryN($0, 2, double) }
228-
|> { map($0, combineDoubleDigits) }
229-
|> sum
225+
|> { reverse($0) }
226+
|> { mapSome($0, { charToInt($0) }) }
227+
|> { mapEveryN($0, 2, {double($0) }) }
228+
|> { map($0, { combineDoubleDigits($0) }) }
229+
|> {sum($0)}
230230
|> isMultipleOf(10)
231231
}
232232

0 commit comments

Comments
 (0)