swiftlings
π¦ Learn Swift interactively by fixing small exercises, inspired by Rustlings
File Explorer
- build-macos.yml
- intro1.swift
- intro2.swift
- operators1.swift
- operators2.swift
- README.md
- strings1.swift
- strings2.swift
- types1.swift
- types2.swift
- variables1.swift
- variables2.swift
- variables3.swift
- if1.swift
- if2.swift
- loops1.swift
- loops2.swift
- loops3.swift
- README.md
- switch1.swift
- switch2.swift
- functions1.swift
- functions2.swift
- functions3.swift
- functions4.swift
- functions5.swift
- README.md
- arrays1.swift
- arrays2.swift
- dictionaries1.swift
- dictionaries2.swift
- README.md
- sets1.swift
- optionals1.swift
- optionals2.swift
- optionals3.swift
- optionals4.swift
- README.md
- README.md
- structs1.swift
- structs2.swift
- structs3.swift
- structs4.swift
- classes1.swift
- classes2.swift
- classes3.swift
- classes4.swift
- README.md
- enums1.swift
- enums2.swift
- enums3.swift
- enums4.swift
- README.md
- protocols1.swift
- protocols2.swift
- protocols3.swift
- protocols4.swift
- README.md
- extensions1.swift
- extensions2.swift
- extensions3.swift
- extensions4.swift
- README.md
- generics1.swift
- generics2.swift
- generics3.swift
- generics4.swift
- README.md
- error_handling1.swift
- error_handling2.swift
- error_handling3.swift
- error_handling4.swift
- README.md
- closures1.swift
- closures2.swift
- closures3.swift
- closures4.swift
- README.md
- memory1.swift
- memory2.swift
- memory3.swift
- memory4.swift
- README.md
- property_wrappers1.swift
- property_wrappers2.swift
- property_wrappers3.swift
- property_wrappers4.swift
- README.md
- concurrency1.swift
- concurrency2.swift
- concurrency3.swift
- concurrency4.swift
- README.md
- README.md
- result_builders1.swift
- result_builders2.swift
- result_builders3.swift
- result_builders4.swift
- advanced_types1.swift
- advanced_types2.swift
- advanced_types3.swift
- advanced_types4.swift
- README.md
- codable1.swift
- codable2.swift
- codable3.swift
- codable4.swift
- README.md
- queue1.swift
- queue2.swift
- queue3.swift
- queue4.swift
- queue5.swift
- queue6.swift
- README.md
- info.json
- build.sh
- chmod.sh
- docc.sh
- dsym_upload.sh
- framework.sh
- git_default_branch.sh
- install-dep.sh
- package_docc.sh
- package_framework.sh
- package_name.sh
- package_version.sh
- README_TESTING.md
- sync_from.sh
- test.sh
- version.sh
- version_bump.sh
- version_number.sh
- version_validate_git.sh
- version_validate_target.sh
- DSACommand.swift
- HintCommand.swift
- InitCommand.swift
- ListCommand.swift
- ResetCommand.swift
- RunCommand.swift
- WatchCommand.swift
- Assert.swift
- Configuration.swift
- Exercise.swift
- ExerciseCompiler.swift
- ExerciseExecutor.swift
- ExerciseManager.swift
- ExerciseMetadata.swift
- ExerciseResetter.swift
- ExerciseRunner.swift
- ProgressTracker.swift
- SwiftlingsError.swift
- TestDetector.swift
- Box.swift
- FileWatcher.swift
- ProcessRunner.swift
- ProgressBar.swift
- RawInput.swift
- Terminal.swift
- main.swift
- Swiftlings.swift
- ConfigurationTests.swift
- ExerciseCompilerTests.swift
- ExerciseExecutorTests.swift
- ExerciseManagerTests.swift
- ExerciseMetadataTests.swift
- ExerciseResetterTests.swift
- ExerciseRunnerSimplifiedTests.swift
- ExerciseTests.swift
- ProgressTrackerTests.swift
- SwiftlingsErrorTests.swift
- TestDetectorTests.swift
- ProcessRunnerTests.swift
- SwiftlingsTests.swift
- .gitignore
- .swiftformat
- .swiftlint.yml
- brief.md
- build-debug.sh
- build-release.sh
- format.sh
- LICENSE
- Makefile
- Package.swift
- README.md
- run-swift-test.sh
# Use via CDN
jsDelivrjsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.
Command Glossary
Commands referenced in this DOCs, explained below.
brew install
View Details βΌ
brew install
Install a Homebrew formula or cask.
brew install {{formula|cask}}
Install a formula/cask:
brew install {{[-s|--build-from-source]}} {{formula}}
Build and install a formula from source (dependencies will still be installed from bottles):
brew install {{[-n|--dry-run]}} {{formula|cask}}
Download the manifest, print what would be installed but don't actually install anything:
brew tap
View Details βΌ
brew tap
Tap a Homebrew formula repository. If no arguments are provided, list all installed Homebrew taps.
brew tap
List installed Homebrew taps:
brew tap {{github_username}}/{{github_repository_name}}
Tap a Git repository hosted on GitHub:
brew tap {{username}}/{{repository_name}} {{git_clone_url}}
Tap a Git repository hosted outside of GitHub:
brew update
View Details βΌ
brew update
Fetch the newest version of Homebrew and all formulae from GitHub using `git` and perform any necessary migrations.
To upgrade all installed formulae, use `brew upgrade`.
brew {{[up|update]}}
Fetch the newest version of Homebrew and all formulae:
brew upgrade
View Details βΌ
brew upgrade
Upgrade outdated formulae and casks.
brew upgrade
Upgrade all outdated casks and formulae:
brew upgrade {{formula|cask}}
Upgrade a specific formula/cask:
brew upgrade {{[-n|--dry-run]}}
Print what would be upgraded, but don't actually upgrade anything:
git checkout
View Details βΌ
git checkout
Checkout a branch or paths to the working tree.
git checkout -b {{branch_name}}
Create and switch to a new branch:
git checkout -b {{branch_name}} {{reference}}
Create and switch to a new branch based on a specific reference (branch, remote/branch, tag are examples of valid references):
git checkout {{branch_name}}
Switch to an existing local branch:
git clone
View Details βΌ
git clone
Clone an existing repository.
git clone {{remote_repository_location}} {{path/to/directory}}
Clone an existing repository into a new directory (the default directory is the repository name):
git clone --recursive {{remote_repository_location}}
Clone an existing repository and its submodules:
git clone {{[-n|--no-checkout]}} {{remote_repository_location}}
Clone only the `.git` directory of an existing repository:
