We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 359ec26 commit 9fa0955Copy full SHA for 9fa0955
benchmark/single-source/LuhnAlgoLazy.swift
@@ -222,11 +222,11 @@ let combineDoubleDigits = {
222
// first, the lazy version of checksum calculation
223
let lazychecksum = { (ccnum: String) -> Bool in
224
ccnum.lazy
225
- |> reverse
226
- |> { mapSome($0, charToInt) }
227
- |> { mapEveryN($0, 2, double) }
228
- |> { map($0, combineDoubleDigits) }
229
- |> sum
+ |> { reverse($0) }
+ |> { mapSome($0, { charToInt($0) }) }
+ |> { mapEveryN($0, 2, {double($0) }) }
+ |> { map($0, { combineDoubleDigits($0) }) }
+ |> {sum($0)}
230
|> isMultipleOf(10)
231
}
232
0 commit comments