天天看點

list子產品

一、

   concat(Things) -> string()

    Types:

    Things = [Thing]

    Thing = atom() | integer() | float() | string()

    Concatenates the text representation of the elements of Things. The elements of Things can be atoms, integers, floats or strings.

    > lists:concat([doc, '/', file, '.', 3]).

    "doc/file.3"

    備注:如果Thing不是List,則會被轉化成List(類似調用Integer_to_List())再完成拼接。

    備注2:string()代表了可以是真的字元串,也可以是一些非字元串的整數的清單。

二、

    flatten(DeepList) -> List

   Types:

             DeepList = [term() | DeepList]

             List = [term()]

             Returns a flattened version of DeepList.

    備注:扁平化,類似于打開一層層的嵌套,将term()最終組成一個List.

繼續閱讀