ncbarta / SwiftCounting

Simple Swift counting functions with custom operators

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SwiftCounting

Simple Swift counting functions with custom operators.

Example usage in main.swift.

Factorials return as Int? so they can be used in expressions and unwrapped however the user would like. Permutations and Combinations return as Int. Permutations and Combinations do fail if given incorrect information, it is up to the user to satisfy preconditions.

Factorial and Double Factorial are implemented in the inefficient recursive way.

Large numbers will trigger errors as to not overflow Int.

About

Simple Swift counting functions with custom operators


Languages

Language:Swift 100.0%