anchor.diff:      else None)
     |> List.choose id
   
  -//using a set instead of priority queue due to this answer by Jon Harrop http://stackoverflow.com/a/3365715
   let aStar graph start goal =
  -  let mutable frontier = Set.empty
  -  let enqueue value = frontier <- Set.add value frontier
  +  //fake a priority queue using lists
  +  let mutable (frontier : (Location * int) list) = []
  +  let enqueue value = frontier <- value :: frontier
     let dequeue () =
  -    let min = Set.minElement frontier
  -    frontier <- Set.remove min frontier
  +    let sorted = frontier |> List.sortBy (fun (_, priority) -> priority)
  +    let min = sorted |> List.head
  +    let tail = sorted |> List.tail
  +    frontier <- tail
       min
   
     let heuristic locationA locationB = Math.Abs(locationA.x - locationB.x) + Math.Abs(locationA.y - locationB.y)
  
positive.code:   graph.cameFrom.[start] <- start
    graph.costSoFar.[start] <- 0
  
    while frontier.Count > 0 do
      let current, priority = dequeue ()
  
      if current <> goal then
  
negative.code: 
  //test helpers
  
  let drawGrid graph start goal =
    let xs = [ 0 .. graph.width - 1  ]
    let ys = [ 0 .. graph.height - 1 ]
    ys |> List.iter (fun y ->
  