From 6ee3b03aa478f5f001e50981bdaa20a76b84d0e4 Mon Sep 17 00:00:00 2001 From: Eleonore9 Date: Wed, 9 Dec 2015 00:17:16 +0000 Subject: [PATCH] Fixed typos --- docs/tutorial.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/tutorial.rst b/docs/tutorial.rst index 4759ec1..c7dba17 100644 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -505,9 +505,9 @@ In Hy: Macros ====== -One really powerful feature of Hy are macros. They are small functios that are +One really powerful feature of Hy are macros. They are small functions that are used to generate code (or data). When program written in Hy is started, the -macros are executed and their output is placed in program source. After this, +macros are executed and their output is placed in the program source. After this, the program starts executing normally. Very simple example: .. code-block:: clj @@ -519,8 +519,8 @@ the program starts executing normally. Very simple example: The thing to notice here is that hello macro doesn't output anything on screen. Instead it creates piece of code that is then executed and prints on -screen. Macro writes a piece of program that looks like this (provided that -we used "Tuukka" as parameter: +screen. This macro writes a piece of program that looks like this (provided that +we used "Tuukka" as parameter): .. code-block:: clj @@ -536,14 +536,14 @@ We can also manipulate code with macros: => (rev (1 2 3 +)) 6 -The code that was generated with this macro just switched around some the -elements, so by the time program started executing, it actually red: +The code that was generated with this macro just switched around some of the +elements, so by the time program started executing, it actually reads: .. code-block:: clj (+ 1 2 3) -Sometimes it's nice to have a very short name for macro that doesn't take much +Sometimes it's nice to have a very short name for a macro that doesn't take much space or use extra parentheses. Reader macros can be pretty useful in these situations (and since Hy operates well with unicode, we aren't running out of characters that soon): @@ -556,7 +556,7 @@ characters that soon): => #↻(1 2 3 +) 6 -Macros are useful when one wishes to extend the Hy or write their own +Macros are useful when one wishes to extend Hy or write their own language on top of that. Many features of Hy are macros, like ``when``, ``cond`` and ``->``.