An open API service indexing awesome lists of open source software.

https://github.com/simonwhitaker/swift-bag

An implementation of the bag (multiset) data structure in Swift
https://github.com/simonwhitaker/swift-bag

Last synced: 3 months ago
JSON representation

An implementation of the bag (multiset) data structure in Swift

Awesome Lists containing this project

README

          

# An implementation of the bag data stucture in Swift

## Usage

``` swift
var b = Bag();
for c in "hello".characters {
b.add(c)
}
let count = b.count // count is 5
let lcount = b.count(for: "l") // lcount is 2
```