put in example

This commit is contained in:
Johan Ceuppens 2012-01-16 23:24:23 +00:00
parent 74100dc3a0
commit 6648869860
1 changed files with 5 additions and 2 deletions

View File

@ -25,13 +25,16 @@
;;; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ;;; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
;;; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ;;; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
;;; THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;;; THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;; Dictionary ADT with ref,set!,add!,make public methods at the end
(load "scgameutil.scm") (load "scgameutil.scm")
;; Usage : ;; Example :
;; (define d (make-color-dictionary 1024)) ;; (define d (make-color-dictionary 1024))
;; (dictionary-ref d 'Navy) ;; returns "000080" ;; (dictionary-ref d 'Navy) ;; returns "000080"
;; (string->color "000080") ;; returns 751, the RGB/BGR value
;; Dictionary ADT with ref,set!,add!,make public methods at the end
(define (make-dictionary1) (define (make-dictionary1)
;; methods are FIFO (first fixed first out) ;; methods are FIFO (first fixed first out)