We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
do
We propose new syntax for do/anonymous function block,
do { ... } i -> { ... }
which is equivalent to
do: ... i -> ...
This syntax makes it easy to pass blocks to a function.
foo do { ... }, i -> { ... }, j -> { ... }, k -> { ... # no indentation allowed }
The { immediately after do, ->(=>) is not considered to be the { of a brace container (set, record, dict).
{
i -> { i + 1 } # : Nat -> Nat i -> { {i + 1} } # : Nat -> Set Nat k = 3 do { i = 1; j = 2; k } # : () -> Nat do { { i = 1; j = 2; k } } # : () -> { i = Nat; j = Nat; k = Nat }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We propose new syntax for
do
/anonymous function block,which is equivalent to
This syntax makes it easy to pass blocks to a function.
The
{
immediately afterdo
, ->(=>) is not considered to be the{
of a brace container (set, record, dict).The text was updated successfully, but these errors were encountered: