README¶
- author
SHIBUKAWA Yoshiki <yoshiki at shibu.jp>
About¶
This is the Erlang domain for Sphinx. Since version 1.0, Sphinx delivers a new feature – Domain. It will enable other language support except Python and C language.
This extension provides directives and roles to write Erlang documents.
The Erlang domain (name erl) supports following objects:
Modules (
erl:module
,erl:mod
)Functions (
erl:function
,erl:func
)Types and opaque types (
erl:type
,erl:opaque
,erl:type
)Records (
erl:record
,erl:record
)Callbacks (
erl:callback
,erl:callback
)
URLs¶
Quick Sample¶
This is source:
.. erl:module:: lists .. erl:function:: append(ListOfLists) -> List1 :type ListOfLists: [[*term()*]] :rtype: [*term()*] Returns a list in which all the sub-lists of ListOfLists have been appended. For example: .. code-block:: erlang > lists:append([[1, 2, 3], [a, b], [4, 5, 6]]). [1,2,3,a,b,4,5,6] .. erl:function:: append(List1, List2) -> List3 :param List1: First Item. :type List1: [*term()*] :param List2: Second Item. :type List2: [*term()*] :rtype: [*term()*] Returns a new list List3 which is made from the elements of List1 followed by the elements of List2. For example: .. code-block:: erlang > lists:append("abc", "def"). "abcdef" ``lists:append(A, B)`` is equivalent to ``A ++ B``.
Results:
- lists:append(ListOfLists) List1 ¶
- Return type
[term()]
Returns a list in which all the sub-lists of ListOfLists have been appended. For example:
> lists:append([[1, 2, 3], [a, b], [4, 5, 6]]). [1,2,3,a,b,4,5,6]
- lists:append(List1, List2) List3 ¶
- Parameters
List1 ([term()]) – First Item.
List2 ([term()]) – Second Item.
- Return type
[term()]
Returns a new list List3 which is made from the elements of List1 followed by the elements of List2. For example:
> lists:append("abc", "def"). "abcdef"
lists:append(A, B)
is equivalent toA ++ B
.
Note
This content is copied from https://www.erlang.org/doc/man/lists.html
From other place, you can create cross reference like that:
Looking at how :erl:func:`lists:append/1` or ``++`` would be implemented in plain Erlang, it can be seen clearly that the first list is copied.
Results:
Looking at how
lists:append/1
or++
would be implemented in plain Erlang, it can be seen clearly that the first list is copied.
Note
This content is copied from https://erlang.org/doc/efficiency_guide/listHandling.html
Install¶
$ pip3 install -U sphinxcontrib-erlangdomain