Swiftpack.co - Package - dn-m/Structure

Structure

Build Status

Algebraic and data structures in Swift 4.2. The Structure package consists of four modules:

Destructure

Module which includes a single extension of Collection, which breaks it into a head and tail for functional-style recursive implementations of algorithms.

extension Collection {
    /// 2-tuple containing the `head` `Element` and `tail` `[Element]` of `Self`
    public var destructured: (Element, SubSequence)? {
        guard let first = first else { return nil }
        return (first, dropFirst())
    }
}
	    

Algebra

Protocols for representing Algebraic structures (Semigroup, Monoid, etc.), and their operations.

DataStructures

Data structures which are not included in the Standard Library.

Algorithms

Algorithms over the Standard Library built-in data structures.

Github

link
Stars: 1
Help us keep the lights on

Dependencies

Used By

Total: 0

Releases

0.3.1 - Jul 12, 2018

0.2 - May 17, 2018

Update code to compile with Swift 4.1, while utilizing new features of the language.

0.1.0 - Jul 31, 2017