Skip to content

Commit

Permalink
Updated dflang doc to reflect new literals and no destructuring
Browse files Browse the repository at this point in the history
  • Loading branch information
JustusAdam committed Nov 29, 2018
1 parent f59c231 commit 1a9203c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions source/compiler-internals/dflang.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@ An example:

.. code-block:: ocaml
let x (* direct assignment *)
let (x) (* target bindings *)
= some.package/sf (* function ref *)
<0> (* call site id *)
(a, b, c) (* arguments *) in
let y = dataflow other.package/a-dataflow-fn<1>() [a] (* context arg (optional) *) in
let (z, q) (* destructure assignment *) = package/anotherSf<2>($1 (* env ref *)) in
let (y, z) = dataflow other.package/a-dataflow-fn<1>() [a] (* context arg (optional) *) in
x
In addition to local variables, such as ``a``, ``b``, ``myVar`` the arguments to
functions can also be numeric literals ``1``, ``0``, ``-4`` or references to
environment expressions. The latter are positive numbers prefixed with ``$``,
i.e. ``$1``, ``$100``.

0 comments on commit 1a9203c

Please sign in to comment.