diff --git a/doc/docs.md b/doc/docs.md index a8e1cdaf99..55106007d7 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -15,7 +15,7 @@ Despite being simple, V gives the developer a lot of power. Anything you can do you can do in V. ## Table of Contents -
1. Hello world | @@ -80,7 +80,7 @@ you can do in V.Appendix II: Operators |
+ ```v pub fn public_function() { @@ -173,6 +173,10 @@ fn private_function() { } ``` +Like constants and types, functions are private (not exported) by default. +To allow other modules to use them, prepend `pub`. The same applies +to constants and types. + ## Constants & variables ```v