List
List copied to clipboard
Singly-linked lists in Swift.
trafficstars
List
This is a Swift microframework which implements an immutable singly-linked List.
Use
// Concatenation
List(elements: [1, 2, 3]) ++ List(elements: [4, 5, 6])
// => List(elements: [1, 2, 3, 4, 5, 6])
See List.swift for more details.
Integration
-
Add this repo as a submodule in e.g.
External/List:git submodule add https://github.com/robrix/List.git External/List -
Drag
List.xcodeprojinto your.xcworkspace/.xcodeproj. -
Add
List.frameworkto your target’sLink Binary With Librariesbuild phase. -
You may also want to add a
Copy Filesphase which copiesList.framework(and any other framework dependencies you need) into your bundle’sFrameworksdirectory. If your target is a framework, you may instead want the client app to includeList.framework.