Skip to content

Swift basics and testable logic (MathUtils, StringUtils) with examples in main.swift. Demonstrates optionals, protocols, and generics.

deepthipathlawath20/swift-fundamentals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Swift Fundamentals

Swift basics and testable logic to demonstrate language foundations: optionals, protocols, generics, and unit tests.

What’s here

  • MathUtils (pure functions with tests)
  • StringUtils (optionals, extensions)
  • Examples in main.swift

Run (web)

Use an online Swift runner. Paste main.swift into the editor together with MathUtils and StringUtils and run. Copy output below.

Sample Output

== Swift Fundamentals Demo ==
Add 2+3=5
Mul 4*5=20
Mean [1,2,3]=2.0
Hello, Deepthi!
Hello, there!

Run (local SPM)

If you have Swift locally:

swift build
swift test
swift run

About

Swift basics and testable logic (MathUtils, StringUtils) with examples in main.swift. Demonstrates optionals, protocols, and generics.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages