10000 GitHub - jsbean/Collections: Collection data structures
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Aug 15, 2019. It is now read-only.

jsbean/Collections

Repository files navigation

Collections

Swift Build Status codecov Carthage compatible GitHub version

Contents

Structures

  • SortedArray
  • OrderdDictionary
  • SortedDictionary
  • Stack
  • Matrix
  • Tree
  • LinkedList

Protocols

  • AnySequenceWrapping

Array extensions

List processing

  • head: Element?
  • tail: Array<Element>
  • destructured: (Element, Array<Element>)

Elements at indices

  • subscript (safe: Int) -> Element?
  • second: Element?
  • penultimate: Element?
  • last(amount: Int) -> [Element]

Removing elements

  • removeFirst() throws
  • removeFirst(amount: Int) throws
  • removeLast(amount: Int) throws

Replacing elements

  • replaceElement(at index: Int, withElement newElement: Element) throws
  • replaceLast(with element: Element) throws
  • replaceFirst(with element: Element) throws

Collection extensions

  • subsets(cardinality: Int) -> [[Iterator.Element]]
  • adjacentPairs: [(Element,Element)]

RangeReplaceableCollection extensions

  • stableSort()

enum extensions

  • cases: [Self]

Integration

Carthage

Integrate Collections into your OSX or iOS project with Carthage.

  1. Follow these instructions to install Carthage, if necessary.
  2. Add github "dn-m/Collections" to your Cartfile.
  3. Follow these instructions to integrate Collections into your OSX or iOS project.

Documentation

See the documentation.

About

Collection data structures

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages

0