<commit_before>The Joxa Language
*****************

Special Forms
-------------

let*
^^^^

.. code-block:: clojure

  (let* (val val-expr ...) expr ...)

try*
^^^^

.. code-block:: clojure

    (try* expr (catch (error-class error-type) catch-expr ...))

case
^^^^

.. code-block:: clojure

    (case expr
        (pattern <optional-guard> expr ...)
        ...)

receive
^^^^^^^

.. code-block:: clojure

    (receive <optional-after>
        (pattern <optional-guard> expr ...)
        ...)
<commit_msg>add more doc for let and let*<commit_after>The Joxa Language
*****************

Special Forms
-------------

let*
^^^^

.. code-block:: clojure

  (let* (val val-expr ...) expr ...)

A non-pattern matching function to bind variables locally. It's similar to `let*`
in Common Lisp, so it could bind the later variable from the previous one, e.g.,

.. code-block:: clojure

  (let* (a 1
         b a)
    b)

In this case, it's not like `let` in Common Lisp.
It's designed as primitive to use in macros and the like. In fact,
the macro `let` is defined by `let*` in `joxa-core`, which is a good example
for the usage of `let*`.


let
^^^^

.. code-block:: clojure

  (let (val val-expr ...) expr ...)

A pattern matching macro to bind variable locally. It's a pattern matching
version of `let*` in Joxa. It's similar to the `let` in Clojure, which
could be used for destructuring, e.g.,

.. code-block:: clojure

                
  (let (a 1
        {b _} {a 2})
    b)

`let` wouldn't work in this case, because the expression `{b _}` doesn't
evaluate to any valid value. The underscore could be used in the place of a
named variable to ignore the corresponding binding, which is the same as
pattern matching in Erlang or desctructuring in Clojure. Currently
there is no warning or error on unused binding.

try*
^^^^

.. code-block:: clojure

    (try* expr (catch (error-class error-type) catch-expr ...))

case
^^^^

.. code-block:: clojure

    (case expr
        (pattern <optional-guard> expr ...)
        ...)

receive
^^^^^^^

.. code-block:: clojure

    (receive <optional-after>
        (pattern <optional-guard> expr ...)
        ...)

{'fraction_non_alphanumeric': 0.16682156133828996, 'fraction_numerical': 0.0013940520446096654, 'mean_word_length': 2.483818770226537, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3777616', 'n_tokens_mistral': 716, 'n_tokens_neox': 670, 'n_words': 260}