List
List copied to clipboard
Singly-linked lists in Swift.
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.xcodeproj
into your.xcworkspace
/.xcodeproj
. -
Add
List.framework
to your target’sLink Binary With Libraries
build phase. -
You may also want to add a
Copy Files
phase which copiesList.framework
(and any other framework dependencies you need) into your bundle’sFrameworks
directory. If your target is a framework, you may instead want the client app to includeList.framework
.