mirror of
https://git.tonybark.com/tonytins/swiftlyfox.git
synced 2026-02-10 16:24:48 -05:00
Initial source commit 🎉
This commit is contained in:
commit
8f83d25989
8 changed files with 114 additions and 0 deletions
22
SwiftyFox.playground/Contents.swift
Normal file
22
SwiftyFox.playground/Contents.swift
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import Cocoa
|
||||
|
||||
let interestingNumbers = [
|
||||
"Prime": [2, 3, 5, 7, 11, 13],
|
||||
"Fibonacci": [1, 1, 2, 3, 5, 8],
|
||||
"Square": [1, 4, 9, 16, 25],
|
||||
];
|
||||
|
||||
var largest = 0
|
||||
|
||||
for (_, numbers) in interestingNumbers {
|
||||
for number in numbers {
|
||||
if number > largest {
|
||||
largest = number // 25
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var total = 0
|
||||
for i in 0..<4 {
|
||||
total += i // 6
|
||||
}
|
||||
2
SwiftyFox.playground/contents.xcplayground
Normal file
2
SwiftyFox.playground/contents.xcplayground
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<playground version='7.0' target-platform='macos' swift-version='6' buildActiveScheme='true' executeOnSourceChanges='true' importAppTypes='true'/>
|
||||
7
SwiftyFox.playground/playground.xcworkspace/contents.xcworkspacedata
generated
Normal file
7
SwiftyFox.playground/playground.xcworkspace/contents.xcworkspacedata
generated
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
Loading…
Add table
Add a link
Reference in a new issue