         self.root = self.put(self.root, assignedKeys, 0, value)
     }
 
-    private func put(_ node: Node<KeyType, Value>?, _ keySet: KeySet, _ index: Int, _ value: Value) -> Node<KeyType, Value>
+    private mutating func put(_ node: Node<KeyType, Value>?, _ keySet: KeySet, _ index: Int, _ value: Value) -> Node<KeyType, Value>
     {
         assert(keySet.count == self.keys)
         




    private mutating func put(_ keySet: KeySet, _ value: Value)
    {
        assert(keySet.count == self.keys)

        // assign don't-care keys
        var assignedKeys = keySet // FIXME: how to handle generating new key of KeyType? keySet.map({$0 ?? self.dontCareKey()})

        if !self.contains(assignedKeys)
        {

 *  Copyright 2016 Philip Erickson
 **************************************************************************************************/

// Adapted from the section on "Ternary Search Tries" in: Sedgewick, R., Wayne, K. (2011). 
// Algorithms, 4th Edition. Addison-Wesley. ISBN: 978-0-321-57351-3 

public struct MultikeyDictionary<KeyType: Comparable, Value>
