From e2e55ef041a54ee017ee555bbdb66838a512fc72 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 15 Oct 2015 13:45:30 -0400 Subject: [PATCH] Document the purpose of `size`. --- prototype/Doubt/TermType.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/prototype/Doubt/TermType.swift b/prototype/Doubt/TermType.swift index 316bda408..a686c311a 100644 --- a/prototype/Doubt/TermType.swift +++ b/prototype/Doubt/TermType.swift @@ -15,7 +15,9 @@ extension TermType { } - /// The size of the receiver. + /// The count of nodes in the receiver. + /// + /// This is used to compute the cost of patches, such that a patch inserting a very large tree will be charged approximately the same as a very large tree consisting of many small patches. public var size: Int { return cata { switch $0 {