|
| 1 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
| 2 | +<HTML> |
| 3 | +<HEAD> |
| 4 | +<!-- EDIT --> |
| 5 | +<TITLE>Mozart Standard Library: Mappings</TITLE> |
| 6 | +<STYLE> |
| 7 | +BODY { |
| 8 | + background-color: white; |
| 9 | + margin-left : 2cm; |
| 10 | + margin-right : 2cm; |
| 11 | + font-family : tahoma,arial,helvetica,sans-serif; |
| 12 | +} |
| 13 | +H1 { |
| 14 | + text-align : center; |
| 15 | + color : #9B0000; |
| 16 | +} |
| 17 | +H2 { color : #FF9933; } |
| 18 | +H4 { color : slateblue; } |
| 19 | +H3 { color : #881155; } |
| 20 | +H5 { color : darkslateblue; } |
| 21 | +CODE { color : #663366; } |
| 22 | +CODE,TT { |
| 23 | + font-family : "lucida console",courier,monospace; |
| 24 | +} |
| 25 | +CODE.DISPLAY { |
| 26 | + display : block; |
| 27 | + white-space : pre; |
| 28 | + margin-left : 2cm; |
| 29 | + margin-top : 1em; |
| 30 | + margin-bottom : 1em; |
| 31 | +} |
| 32 | +P.AUTHOR { |
| 33 | + text-align : center; |
| 34 | + font-weight : bold; |
| 35 | +} |
| 36 | +SPAN.MODULE { |
| 37 | + color : steelblue; |
| 38 | +} |
| 39 | +A { color : steelblue; } |
| 40 | +SPAN.COMMENT { color: #B22222; } |
| 41 | +SPAN.KEYWORD { color: #A020F0; } |
| 42 | +SPAN.STRING { color: #BC8F8F; } |
| 43 | +SPAN.FUNCTIONNAME { color: #0000FF; } |
| 44 | +SPAN.TYPE { color: #228B22; } |
| 45 | +SPAN.VARIABLENAME { color: #B8860B; } |
| 46 | +SPAN.REFERENCE { color: #5F9EA0; } |
| 47 | +SPAN.BUILTIN { color: #DA70D6; } |
| 48 | +</STYLE> |
| 49 | +</HEAD> |
| 50 | +<BODY> |
| 51 | +<!-- EDIT --> |
| 52 | +<H1>Mappings</H1> |
| 53 | +<P CLASS="AUTHOR">Denys Duchier</P> |
| 54 | +<DL> |
| 55 | + <DT><B>module</B> |
| 56 | + <DD><SPAN CLASS="MODULE">x-oz://system/Mapping.ozf</SPAN> |
| 57 | +</DL> |
| 58 | +<HR> |
| 59 | + |
| 60 | +<P>This module provides a uniform interface to standard <I>mapping</I> datatypes, |
| 61 | +i.e. records, dictionaries and arrays |
| 62 | + |
| 63 | +<H2>Exports</H2> |
| 64 | +<DL> |
| 65 | +<DT><CODE>{Mapping.get +M +Key ?Value}</CODE> |
| 66 | +<DD>returns the <CODE>Value</CODE> associated with <CODE>Key</CODE> in |
| 67 | +mapping <CODE>M</CODE> |
| 68 | +<DT><CODE>{Mapping.put +M +Key +Value}</CODE> |
| 69 | +<DD>sets the <CODE>Value</CODE> associated with <CODE>Key</CODE> in |
| 70 | +mapping <CODE>M</CODE> (assuming the latter is mutable) |
| 71 | +<DT><CODE>{Mapping.condGet +M +Key +Default ?Value}</CODE> |
| 72 | +<DT><CODE>{Mapping.condSelect +M +Key +Default ?Value}</CODE> |
| 73 | +<DD>returns the <CODE>Value</CODE> associated with <CODE>Key</CODE> in |
| 74 | +mapping <CODE>M</CODE>, or <CODE>Default</CODE> if none |
| 75 | +<DT><CODE>{Mapping.is +M ?B}</CODE> |
| 76 | +<DD>returns true iff <CODE>M</CODE> is a mapping |
| 77 | +<DT><CODE>{Mapping.isMutable +M ?B}</CODE> |
| 78 | +<DD>returns true iff <CODE>M</CODE> is a mutable mapping |
| 79 | +<DT><CODE>{Mapping.items +M ?L}</CODE> |
| 80 | +<DT><CODE>{Mapping.toList +M ?L}</CODE> |
| 81 | +<DD>returns a list of the values in the mapping |
| 82 | +<DT><CODE>{Mapping.keys +M ?L}</CODE> |
| 83 | +<DT><CODE>{Mapping.arity +M ?L}</CODE> |
| 84 | +<DD>returns a list of the keys of the mapping |
| 85 | +<DT><CODE>{Mapping.entries +M ?L}</CODE> |
| 86 | +<DT><CODE>{Mapping.toListInd +M ?L}</CODE> |
| 87 | +<DD>returns a list of the entries <CODE>Key#Value</CODE> in the mapping |
| 88 | +</DL> |
| 89 | + |
| 90 | +<HR> |
| 91 | +</BODY> |
| 92 | +</HTML> |
0 commit comments