erlang包里有个lib文件。
stdlib学习
%append
-module(lists_1).
-export([start/0, start/1]).
start()->lists:sum([1,2,3,4]).
%result 10
start(1)->
lists:append([1,2],[3,4]);%no' . 'cast error
%result [1,2,3,4]
start(2)->
lists:concat(["abc", 'def', 23]);
%result "abcdef23"
start(3)->
lists:concat([23,'efd','%']);
%result "23efd%"
start(4)->
lists:delete("lylian", ["lylian", "love", "somebody", 23]);
%result ["love", "somebody", 23]
start(5)->
lists:duplicate(3, "lylian").
%result ["lylian", "lylian", "lylian"]
start(6)->
lists:flatlength([1,2,3,4,5,6,7,8,9]);
%result 9
start(7)->
lists:flatten([1,2,3,4,5,6,7,8,9],[11,12,13]);
%result [1,2,3,4,5,6,7,8,9,11,12,13]
start(8)->
lists:keydelete("K", 1,[{"A"},{"K"},{"K"},{"K"},{"B"},{"c"}]);
%result [{"A"},{"K"},{"K"},{"B"},{"c"}]
start(9)->
lists:keydelete("K", 1, ["A", "k", "K", "K"]);
%result ["A","k","K","K"](this is not good for using the function.)
start(10)->
lists:keymember("k" , 1, [{"k"}, {"K"}]);
%result true
start(11)->
lists:keymerge(1, [{"k"}, {"K"}],[{"k1"}, {"K2"}]).
%result [{"k"},{"K"},{"k1"},{"K2"}]
start(12)->
lists:keyreplace("k", 1, [{"k"}, {"k"}, {"A"}], {"a"}).
%result [{"a"},{"k"},{"A"}]
分享到:
相关推荐
Lists-Lists-Lists
理工科必备的Journal Term Lists,使用EndNote导入,可以使得插入参考文献时更加的准确。。。
filelists.xml.gz filelists.xml.gz filelists.xml.gz
com.google.common.collect.Lists的jar包
Awesome Lists
工程学期刊缩写Endnote Term Lists 来自哥大图书馆,7000多条。可以Endnote直接导入。
access lists are built, and give examples of how to apply those access lists in different situations. Along the way, there are a number of sidebars and notes about concepts and information important...
Coq Lists.v 答案 Coq Lists.v 答案 Coq Lists.v 答案
七千多种工程类论文期刊简称,用于endnote导出。但是有些时候还会存在一些问题,最为常见的就是有些期刊仍旧不能显示缩写的问题,这时候就需要我们在“journal term lists”进行手动添加即可。
Python手撕算法Lists
前端项目-angular-drag-and-drop-lists,Angular directives for sorting nested lists using the HTML5 Drag and Drop API
Variable-length Argument Lists
jquery-sortable-lists, 用于排序列表的jQuery插件还包括树结构 jquery-sortable-lists用于排序列表的插件还包括树结构。$('#myList').sortableLists( options );你可以通过鼠标对html列表的项进行排序。 创建树结构...
If you're looking to succeed with Python lists then this brand new book by Python expert, Marc Poulin, reveals how every Python programmer can write programs faster and with fewer bugs. In fact, here'...
sap 资源 例子 zand_lists
Skip Lists
ISO 15924 Code Lists
资源分类:Python库 所属语言:Python 资源全名:mdx_truly_sane_lists-1.2-py3-none-any.whl 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
Treap数据结构和Skip Lists,英文附图解,若侵犯版权,我立即删掉
Merge two lists of ordered numbers