2014-06-14 13:27:01 -04:00
Libraries
=========
Picrin's all built-in libraries are described below.
Scheme standard libraries
-------------------------
- (scheme write)
- (scheme cxr)
- (scheme file)
- (scheme inexact)
- (scheme time)
- (scheme process-context)
- (scheme load)
- (scheme lazy)
SRFI libraries
--------------
- (srfi 1)
List manipulation library.
- (srfi 26)
Cut/cute macros.
- (srfi 95)
Sorting and Marging.
(picrin macro)
2014-06-14 13:36:11 -04:00
--------------
Utility functions and syntaces for macro definition.
2014-06-14 13:27:01 -04:00
- define-macro
- gensym
- macroexpand
Old-fashioned macro.
- make-syntactic-closure
- identifier?
- identifier=?
Syntactic closures.
- er-macro-transformer
- ir-macro-transformer
Explicit renaming macro family.
(picrin regexp)
2014-06-14 13:36:11 -04:00
---------------
2014-06-14 13:27:01 -04:00
2014-06-14 13:46:02 -04:00
.. glossary ::
2014-06-14 13:27:01 -04:00
2014-06-14 13:46:02 -04:00
(regexp ptrn [flags])
2014-06-14 13:27:01 -04:00
2014-06-14 13:46:02 -04:00
Compiles pattern string into a regexp object. A string flags may contain any of #\g, #\i, #\m.
2014-06-14 13:36:11 -04:00
2014-06-14 13:46:02 -04:00
(regexp? obj)
2014-06-14 13:36:11 -04:00
2014-06-14 13:46:02 -04:00
Judges if obj is a regexp object or not.
2014-06-14 13:27:01 -04:00
2014-06-14 13:46:02 -04:00
(regexp-match re input)
2014-06-14 13:27:01 -04:00
2014-06-14 13:46:02 -04:00
Returns two values: a list of match strings, and a list of match indeces.
2014-06-14 13:27:01 -04:00
2014-06-14 13:46:02 -04:00
(regexp-replace re input txt)
(regexp-split re input)
2014-06-14 13:27:01 -04:00
2014-06-14 13:36:11 -04:00
(picrin control)
----------------
2014-06-14 13:27:01 -04:00
Delimited control operators.
2014-06-14 13:36:11 -04:00
(reset h)
^^^^^^^^^
(shift k)
^^^^^^^^^
2014-06-14 13:27:01 -04:00
(picrin dictionary)
2014-06-14 13:36:11 -04:00
-------------------
2014-06-14 13:27:01 -04:00
Symbol to Object table. Internally it is implemented on hash-table.
Note that dictionary is not a weak map; if you are going to make a highly memory-consuming program with dictionaries, you should know that dictionaries keep their bound objects and never let them free until you explicitly deletes bindings.
2014-06-14 13:36:11 -04:00
(dictionary)
^^^^^^^^^^^^
2014-06-14 13:27:01 -04:00
Returns a newly allocated empty dictionary. In the future, it is planned to extend this function to take optional arguments for initial key/values.
2014-06-14 13:36:11 -04:00
(dictionary? obj)
^^^^^^^^^^^^^^^^^
2014-06-14 13:27:01 -04:00
Returns #t if obj is a dictionary.
2014-06-14 13:36:11 -04:00
(dictionary-ref dict key)
^^^^^^^^^^^^^^^^^^^^^^^^^
2014-06-14 13:27:01 -04:00
Look up dictionary dict for a value associated with symbol key. If no object is associated with key, it will raise an error.
2014-06-14 13:36:11 -04:00
(dictionary-set! dict key obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2014-06-14 13:27:01 -04:00
If there is no value already associated with key, this function newly creates a binding of key with obj. Otherwise, updates the existing binding with given obj.
2014-06-14 13:36:11 -04:00
(dictionary-delete dict key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2014-06-14 13:27:01 -04:00
Deletes the binding associated with key from dict. If no binding on dict is associated with key, an error will be raised.
2014-06-14 13:36:11 -04:00
(dictionary-size dict)
^^^^^^^^^^^^^^^^^^^^^^
2014-06-14 13:27:01 -04:00
Returns the number of registered elements in dict.
(picrin user)
2014-06-14 13:36:11 -04:00
-------------
2014-06-14 13:27:01 -04:00
When you start the REPL, you are dropped into here.