anchor.diff:          // Failure is unimportant here, no?
           ignore <| send_message address JoinState states key
           node
  +    | JoinState ->
  +        let string_states = msg.Split([|SEPARATOR|], StringSplitOptions.RemoveEmptyEntries)
  +        let states = Array.foldBack (fun str acc -> (deserialize str)::acc) string_states []
  +
  +        let rec last = function
  +            | head::[] -> head
  +            | head::tail -> last tail
  +            | _ -> failwith "Unreachable scenario found /o/"
  +
  +        let A = List.head states    // Physically closest to this node
  +        let Z = last states         // GUID-wise  closest to this node
  +
  +        // Get this node's neighbors (the nodes physically closest to this one)
  +        let nfolder k v (acc: Map<GUID, NetworkLocation>) =
  +            if acc.Count >= MAX_LEAVES then acc else Map.add k v acc
  +        let neighbors = Map.foldBack nfolder A.neighbors (Map.ofList [(A.guid, A.address)])
  +
  +        // Get this node's leaves (the nodes with MAX_LEAVES/2 smaller and bigger GUIDs)
  +        let leaves =
  +            let inner_leaves =
  +                if Z.leaves.Count < MAX_LEAVES then
  +                    Z.leaves
  +                else
  +                    // The minimum leaf is farther from this node than the maximum
  +                    if (distance node.guid Z.minleaf) > (distance node.guid Z.maxleaf) then
  +                        Map.remove Z.minleaf Z.leaves
  +                    else
  +                        Map.remove Z.maxleaf Z.leaves
  +            Map.add Z.guid Z.address inner_leaves
  +
  +        let lfolder k _ (acc: GUID * GUID) =
  +            let (minleaf, maxleaf) = acc
  +            if k < minleaf then
  +                (k, maxleaf)
  +            else if k > maxleaf then
  +                (minleaf, k)
  +            else acc
  +        let (minleaf, maxleaf) = Map.foldBack lfolder leaves (node.guid, node.guid)
  +
  +        printfn "Neighbors of %A: %A" node.guid neighbors
  +        printfn "Leaves    of %A: %A" node.guid leaves
  +        { node with
  +            neighbors = neighbors;
  +            leaves = leaves;
  +            minleaf = minleaf;
  +            maxleaf = maxleaf;
  +        }
       | _ ->
           node
   
  
positive.code: open System.IO
  open System.Threading
  
  // Type definitions
  type U128 = uint64 * uint64
  type NetworkLocation = string // an url... Maybe something better later
  type GUID = U128 // u128... Maybe something better later
  type Address = NetworkLocation
  
  //type DeliverFunc = string -> GUID -> unit
  //type ForwardFunc = string -> GUID -> GUID -> string * GUID
  //type NewLeafFunc = GUID list -> unit
  
  // ====================== CONFIG ======================
  
  let b = 4 // 2^b-1 per row in the routing table
  let len_L = 16 // or 32
  
  // ====================================================
  
  // UPDATE: send_messsage and start_listening.listen
  type MessageType =
  | Join      // A new node is joining and requesting states
  | Update    // A new node has been added sucessfully: update to include it
  | JoinState // The state data for a new node
  | Route     // Send a message somewhere
  // Add more persistency commands here
  
  // The state record of a Pastry node
  type Node = {
  
negative.code:             Some((ua, ub)) //
          with
              | ex -> None
  
  // Makes the given pastry node start listening...
  let start_listening (node: Node) =
  