Skip to content

Commit

Permalink
Deploying to gh-pages from @ d10a340 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
cgay committed Nov 5, 2024
1 parent 36db633 commit 5325fd3
Show file tree
Hide file tree
Showing 266 changed files with 772 additions and 555 deletions.
110 changes: 102 additions & 8 deletions _sources/library-reference/collections/collectors.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,111 @@ The collectors Module
.. current-library:: collections
.. current-module:: collectors

.. macro:: collecting
:statement:

Collect values into a named or unnamed collector. A collector may be, for example, a
:drm:`<collection>`, a number into which values are accumulated, etc.

:macrocall:
.. parsed-literal::
collecting ([`name`] [as `type`])
[ `body` ]
end [ collecting ]
:parameter name: A Dylan variable-name *BNF*. If omitted, the collection is returned
from the :macro:`collecting` macro call. If supplied, the caller is responsible for
calling ``collected(name)`` to retrieve the collection before the call to
`collecting` terminates.
:parameter type: A Dylan type. The default value is :drm:`<list>`.
:parameter body: A Dylan body *BNF*.

:description:

Binds *name* (or a default variable name if *name* is not supplied) to a collector
that can efficiently collect new values into the collection when :macro:`collect`
or the related ``collect-*`` macros are called.

:example:

.. code-block:: dylan
collecting () collect(1); collect(2) end;
// => #(1, 2)
collecting () collect(1); collect-first(2) end;
// => #(2, 1)
collecting (as <integer>) collect(1); collect(2) end;
// => 3
collecting (a, b, c)
collect-into(a, 1);
collect-into(b, 2);
collect-into(c, 3);
values(collected(a), collected(b), collected(c)
end;
// => #(1), #(2), #(3)
.. macro:: collect

:description: Collect a value at the end of the unnamed collector: ``collect(100)``
May only be used when ``collecting () ... end`` was called with no arguments.

:seealso: :macro:`collecting`

.. macro:: collect-first

.. macro:: collect-first-into
:description: Collect a value at the beginning of the unnamed collector:
``collect-first(100)`` May only be used when ``collecting () ... end`` was called
with no arguments.

.. macro:: collect-into
:seealso: :macro:`collecting`

.. macro:: collect-last

:description: Collect a value at the end of the unnamed collector:
``collect-last(100)`` May only be used when ``collecting () ... end`` was called
with no arguments.

:seealso: :macro:`collecting`

.. macro:: collect-into

:description: Collect a value at the end of a named collector: ``collect-into(c,
100)`` May only be used when ``collecting (c) ... end`` was called with arguments.

:seealso: :macro:`collecting`

.. macro:: collect-first-into

:description: Collect a value at the beginning of a named collector:
``collect-first-into(c, 100)`` May only be used when ``collecting (c) ... end`` was
called with arguments.

:seealso: :macro:`collecting`

.. macro:: collect-last-into

:description: Collect a value at the end of a named collector: ``collect-last-into(c,
100)`` May only be used when ``collecting (c) ... end`` was called with arguments.

:seealso: :macro:`collecting`

.. macro:: collected

.. macro:: collecting
:description: Retrieve the value of the collection associated with a collector.

:example:

.. code-block:: dylan
collecting () ... map(f, collected()) ... end
collecting (a, b) ... map(f1, collected(a)); map(f2, collected(b)); ... end
:seealso: :macro:`collecting`

.. generic-function:: collector-protocol
:open:
Expand All @@ -28,9 +118,13 @@ The collectors Module

:parameter class: An instance of :drm:`<object>`.
:value new-collector: An instance of :drm:`<object>`.
:value add-first: An instance of :drm:`<function>`.
:value add-last: An instance of :drm:`<function>`.
:value add-sequence-first: An instance of :drm:`<function>`.
:value add-sequence-last: An instance of :drm:`<function>`.
:value collection: An instance of :drm:`<function>`.
:value add-first: A :drm:`<function>` that accepts the collection and a value and adds
the value to the beginning of the collection.
:value add-last: A :drm:`<function>` that accepts the collection and a value and adds
the value to the end of the collection.
:value add-sequence-first: An instance of :drm:`<function>`. **Not yet implemented.**
:value add-sequence-last: An instance of :drm:`<function>`. **Not yet implemented.**
:value collection: A :drm:`<function>` that receives the collector and returns the
collection.

:seealso: :macro:`collecting`
2 changes: 1 addition & 1 deletion _static/styles/furo.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _static/styles/furo.css.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions about/examples/classes.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="index" title="Index" href="../../genindex.html" /><link rel="search" title="Search" href="../../search.html" /><link rel="next" title="Generic Functions" href="generic_functions.html" /><link rel="prev" title="Everything is a value" href="everything_value.html" />

<link rel="shortcut icon" href="../../_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2024.07.18 -->
<link rel="shortcut icon" href="../../_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2024.08.06 -->
<title>Classes &amp; Instantiation - Open Dylan</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=613ab9ff" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=354aac6f" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo-extensions.css?v=302659d7" />
Expand Down
4 changes: 2 additions & 2 deletions about/examples/everything_value.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="index" title="Index" href="../../genindex.html" /><link rel="search" title="Search" href="../../search.html" /><link rel="next" title="Classes &amp; Instantiation" href="classes.html" /><link rel="prev" title="Hello, World!" href="hello_world.html" />

<link rel="shortcut icon" href="../../_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2024.07.18 -->
<link rel="shortcut icon" href="../../_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2024.08.06 -->
<title>Everything is a value - Open Dylan</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=613ab9ff" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=354aac6f" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo-extensions.css?v=302659d7" />
Expand Down
4 changes: 2 additions & 2 deletions about/examples/generic_functions.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="index" title="Index" href="../../genindex.html" /><link rel="search" title="Search" href="../../search.html" /><link rel="next" title="Getters &amp; Setters are functions" href="getters_setters_functions.html" /><link rel="prev" title="Classes &amp; Instantiation" href="classes.html" />

<link rel="shortcut icon" href="../../_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2024.07.18 -->
<link rel="shortcut icon" href="../../_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2024.08.06 -->
<title>Generic Functions - Open Dylan</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=613ab9ff" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=354aac6f" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo-extensions.css?v=302659d7" />
Expand Down
4 changes: 2 additions & 2 deletions about/examples/getters_setters_functions.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="index" title="Index" href="../../genindex.html" /><link rel="search" title="Search" href="../../search.html" /><link rel="next" title="Keyword Arguments" href="keyword_arguments.html" /><link rel="prev" title="Generic Functions" href="generic_functions.html" />

<link rel="shortcut icon" href="../../_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2024.07.18 -->
<link rel="shortcut icon" href="../../_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2024.08.06 -->
<title>Getters &amp; Setters are functions - Open Dylan</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=613ab9ff" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=354aac6f" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo-extensions.css?v=302659d7" />
Expand Down
4 changes: 2 additions & 2 deletions about/examples/hello_world.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="index" title="Index" href="../../genindex.html" /><link rel="search" title="Search" href="../../search.html" /><link rel="next" title="Everything is a value" href="everything_value.html" /><link rel="prev" title="A Quick Tour of Dylan" href="../index.html" />

<link rel="shortcut icon" href="../../_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2024.07.18 -->
<link rel="shortcut icon" href="../../_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2024.08.06 -->
<title>Hello, World! - Open Dylan</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=613ab9ff" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=354aac6f" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo-extensions.css?v=302659d7" />
Expand Down
4 changes: 2 additions & 2 deletions about/examples/keyword_arguments.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="index" title="Index" href="../../genindex.html" /><link rel="search" title="Search" href="../../search.html" /><link rel="next" title="Limited Types" href="limited_types.html" /><link rel="prev" title="Getters &amp; Setters are functions" href="getters_setters_functions.html" />

<link rel="shortcut icon" href="../../_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2024.07.18 -->
<link rel="shortcut icon" href="../../_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2024.08.06 -->
<title>Keyword Arguments - Open Dylan</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=613ab9ff" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=354aac6f" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo-extensions.css?v=302659d7" />
Expand Down
4 changes: 2 additions & 2 deletions about/examples/limited_types.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="index" title="Index" href="../../genindex.html" /><link rel="search" title="Search" href="../../search.html" /><link rel="next" title="Macros" href="macros.html" /><link rel="prev" title="Keyword Arguments" href="keyword_arguments.html" />

<link rel="shortcut icon" href="../../_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2024.07.18 -->
<link rel="shortcut icon" href="../../_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2024.08.06 -->
<title>Limited Types - Open Dylan</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=613ab9ff" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=354aac6f" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo-extensions.css?v=302659d7" />
Expand Down
4 changes: 2 additions & 2 deletions about/examples/macros.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="index" title="Index" href="../../genindex.html" /><link rel="search" title="Search" href="../../search.html" /><link rel="next" title="Multiple Return Values" href="multiple_return_values.html" /><link rel="prev" title="Limited Types" href="limited_types.html" />

<link rel="shortcut icon" href="../../_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2024.07.18 -->
<link rel="shortcut icon" href="../../_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2024.08.06 -->
<title>Macros - Open Dylan</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=613ab9ff" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=354aac6f" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo-extensions.css?v=302659d7" />
Expand Down
4 changes: 2 additions & 2 deletions about/examples/multiple_return_values.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="index" title="Index" href="../../genindex.html" /><link rel="search" title="Search" href="../../search.html" /><link rel="next" title="Getting Started with the Open Dylan Command Line Tools" href="../../getting-started-cli/index.html" /><link rel="prev" title="Macros" href="macros.html" />

<link rel="shortcut icon" href="../../_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2024.07.18 -->
<link rel="shortcut icon" href="../../_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2024.08.06 -->
<title>Multiple Return Values - Open Dylan</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=613ab9ff" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=354aac6f" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo-extensions.css?v=302659d7" />
Expand Down
4 changes: 2 additions & 2 deletions about/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" /><link rel="next" title="Hello, World!" href="examples/hello_world.html" /><link rel="prev" title="String Literal Syntax" href="../proposals/dep-0012-string-literals.html" />

<link rel="shortcut icon" href="../_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2024.07.18 -->
<link rel="shortcut icon" href="../_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2024.08.06 -->
<title>A Quick Tour of Dylan - Open Dylan</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=613ab9ff" />
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=354aac6f" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=eafc0fe6" />
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=302659d7" />
Expand Down
4 changes: 2 additions & 2 deletions articles/beyond-java.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" />

<link rel="shortcut icon" href="../_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2024.07.18 -->
<link rel="shortcut icon" href="../_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2024.08.06 -->
<title>Beyond Java? - Open Dylan</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=613ab9ff" />
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=354aac6f" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=eafc0fe6" />
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=302659d7" />
Expand Down
4 changes: 2 additions & 2 deletions articles/macro-system.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" />

<link rel="shortcut icon" href="../_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2024.07.18 -->
<link rel="shortcut icon" href="../_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2024.08.06 -->
<title>The Dylan Macro System - Open Dylan</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=613ab9ff" />
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=354aac6f" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=eafc0fe6" />
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=302659d7" />
Expand Down
Loading

0 comments on commit 5325fd3

Please sign in to comment.