Data update
This commit is contained in:
parent
ed705008a8
commit
0df55f9f24
2196 changed files with 32999 additions and 3075 deletions
|
|
@ -1,13 +1,3 @@
|
|||
func isEven(n:Int) -> Bool {
|
||||
// Swift has Int.isMultiple(of:Int) -> Bool
|
||||
|
||||
// Bitwise check
|
||||
if (n & 1 != 0) {
|
||||
return false
|
||||
}
|
||||
|
||||
// Mod check
|
||||
if (n % 2 != 0) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
var isEven: (_:Int) -> Bool = {$0.isMultiple(of: 2)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue