Skip to content

Instantly share code, notes, and snippets.

// MARK: Equatable
func ==<T>(lhs: TerminatingNode<T>, rhs: TerminatingNode<T>) -> Bool {
return lhs.value == rhs.value
}
func ==<T, U>(lhs: ListNode<T, U>, rhs: ListNode<T, U>) -> Bool {
return lhs.value == rhs.value && lhs.next == rhs.next
}