From 7771edccf5b31b6b46fa7ad5888db27cb481f9a7 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 15 Oct 2015 11:47:27 -0400 Subject: [PATCH] .Recursive replaces. --- prototype/Doubt/Interpreter.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/prototype/Doubt/Interpreter.swift b/prototype/Doubt/Interpreter.swift index d11a5eb65..5b1bb2701 100644 --- a/prototype/Doubt/Interpreter.swift +++ b/prototype/Doubt/Interpreter.swift @@ -33,7 +33,8 @@ public struct Interpreter { return recur(f(.Keyed(Dictionary(elements: b.keys.map { ($0, self.run(a[$0]!, b[$0]!)) })))) default: - return nil + // This must not call `recur` directly with `a` and `b`, as that would infinite loop if actually recursive. + return recur(f(.Replace(a, b))) } default: