Skip to content

Commit

Permalink
Added macrolet statement to README
Browse files Browse the repository at this point in the history
  • Loading branch information
DrSplinter committed Nov 26, 2017
1 parent 1918601 commit 6bff296
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,26 @@ Compiled:
return 1.0;
}

### MACROLET statement

MACROLET ({(name lambda-list local-form*)}*) statement*

`macrolet` establishes local macro definitions, using the same format as `defkernelmacro`, and executes a series of `statement`s with these definition bindings.

Example:

(macrolet ((square (a)
(if (numberp a)
(* a a)
`(* ,a ,a))))
(return (square 2)))

Compiled:

{
return 4;
}

### DO statement

DO ({(var init-form step-form)}*) (test-form) statement*
Expand Down

0 comments on commit 6bff296

Please sign in to comment.