Elixir Keyword List 真相

Posted by zhulinpinyu on July 4, 2017

Keyword list:

[ method: "", path: "", resp_body: "", status: nil ]

事实上其内部表示形式为:

[ {:method, ""}, {:path, ""}, {:resp_body, ""}, {:status, nil} ]

总结:keyword list 实际是Tuple list, 明确的说就是只有一个key的元组的list