Documentation prelude (#15377)
This commit is contained in:
parent
c2434d939e
commit
db9ab2a4c0
1 changed files with 29 additions and 0 deletions
29
doc/prelude.rst
Normal file
29
doc/prelude.rst
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
Prelude
|
||||||
|
=======
|
||||||
|
|
||||||
|
This is an include file that simply imports common modules for your convenience:
|
||||||
|
|
||||||
|
.. code-block:: nim
|
||||||
|
include prelude
|
||||||
|
|
||||||
|
Same as:
|
||||||
|
|
||||||
|
.. code-block:: nim
|
||||||
|
import os, strutils, times, parseutils, parseopt, hashes, tables, sets
|
||||||
|
|
||||||
|
|
||||||
|
Examples
|
||||||
|
========
|
||||||
|
|
||||||
|
Get the basic most common imports ready to start coding using ``prelude``:
|
||||||
|
|
||||||
|
.. code-block:: nim
|
||||||
|
include prelude
|
||||||
|
|
||||||
|
echo now()
|
||||||
|
echo getCurrentDir()
|
||||||
|
echo "Hello $1".format("World")
|
||||||
|
|
||||||
|
|
||||||
|
See also:
|
||||||
|
- `Sugar <sugar.html>`_
|
||||||
Loading…
Add table
Add a link
Reference in a new issue