## `(<linked list> <where:<linked list node>> <any>...)-><linked list node>`
##  
## replaces the specified linked list node and returns new node
function(linked_list_replace linked_list where)
  map_import_properties(${where} previous next)
  linked_list_node_new(${ARGN})
  ans(node)
  map_set_hidden(${node} next ${next})
  map_set_hidden(${node} previous ${previous})
  if(next)
    map_set_hidden(${next} previous ${node})
  else()
    map_set(${linked_list} tail "${node}")
  endif()
  if(previous)
    map_set_hidden(${previous} next ${node})
  else()
    map_set(${linked_list} head "${node}")
  endif()
  return(${node})
endfunction()