From 673de1c627a2046123e1693e9e6508399a028508 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sat, 3 Oct 2020 16:38:35 -0400 Subject: Write files directly from md.bqn, not gendocs (removes trailing empty lines) --- docs/doc/syntax.html | 1 - 1 file changed, 1 deletion(-) (limited to 'docs/doc/syntax.html') diff --git a/docs/doc/syntax.html b/docs/doc/syntax.html index 427f05c9..0a6aab58 100644 --- a/docs/doc/syntax.html +++ b/docs/doc/syntax.html @@ -156,4 +156,3 @@

Blocks are written with curly braces {} and can be used to group expressions or define functions and modifiers. The contents are simply a sequence of expressions, where each is evaluated and the result of the last is returned in order to evaluate the block. This result can have any value, and its syntactic role in the calling context is determined by the normal rules: functions return subjects and modifiers return functions. Blocks have lexical scope.

The special names 𝕨 and 𝕩, which stand for arguments, and 𝕗 and 𝕘, which stand for operands, are available inside curly braces. Like ordinary names, the lowercase forms indicate subjects and the uppercase forms 𝕎𝕏𝔽𝔾 indicate functions. The type and syntactic role of the block is determined by its contents: a 2-modifier contains 𝕘, a 1-modifier contains 𝕗 but not 𝕘, and a function contains neither but does have one of 𝕨𝕩𝕤𝕎𝕏𝕊. If no special names are present the block is an immediate block and is evaluated as soon as it appears, with the result having a subject role.

A modifier can be evaluated twice: once when passed operands and again when the resulting function is passed arguments. If it contains 𝕨 or 𝕩, the first evaluation simply remembers the operands, and the contents will be executed only on the second evaluation, when the arguments are available. If it doesn't contain these, then the contents are executed on the first evaluation and the result is treated as a function.

- -- cgit v1.2.3