Commit 15de1954 authored by Chris Müller's avatar Chris Müller
Browse files

Add module documentation in form of examples

parent b99b193d
;; ----------------------------------------------------------------------------------
;; each cherry file represents a module and is specified through its path relative from LOADPATH
;; e.g. File: $LOADPATH/cherry/string.cherry corresponds to the module cherry.string
;; importing all symbols and functions from a module is done by import macro
;; ----------------------------------------------------------------------------------
;; Imports all symbols from cherry/string.cherry under the namespace string.cherry
(import cherry.string)
(cherry.string/toupper "test")
;; Imports all symbols under a specified namespace
(import cherry.string str)
(str/toupper "test")
;; Imports a set of symbols
(import (cherry.string toupper))
;; Imports a set of symbols under a specific namespace
(import (cherry.string toupper) str)
(str/toupper "test")
;; Imports all symbols under the current namespace
(import cherry.string *)
(import (cherry.string toupper) *)
(toupper "test")
;; Imports all symbols from all modules in cherry
(import cherry.*)
;; Imports all modules into the current namespace
(import cherry.* *)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment