From ab554c52a0abf30e294f772d1ced4fbe9858655a Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Wed, 14 Oct 2015 09:59:04 -0400 Subject: [PATCH] Unwrap Cofrees. --- prototype/Doubt/Cofree.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/prototype/Doubt/Cofree.swift b/prototype/Doubt/Cofree.swift index 6ec780837..8e9b89325 100644 --- a/prototype/Doubt/Cofree.swift +++ b/prototype/Doubt/Cofree.swift @@ -2,6 +2,13 @@ public enum Cofree { indirect case Unroll(B, Syntax) + + public var unwrap: Syntax { + switch self { + case let .Unroll(_, rest): + return rest + } + } }