#lang racket ;; CSE 341 Fall 2011, Lecture 24 ;; Abstraction with dynamic types ;; This is one of several files. This file shows how to be a ;; client for lec24_rationals.rkt (require "lec24_rationals.rkt") ;; (rat 4 0) ;; nope: only get what is provided (define r (add (make-frac 12 -8) (make-frac 1 3))) ;; like with provide, there are many conveniences for namespace management (require (prefix-in rat: "lec24_rationals.rkt")) (define r2 (rat:add (rat:make-frac 12 -8) (rat:make-frac 1 3))) ;; there are also ways to import only some of the identifiers provided, or ;; all except some, etc. -- basically fine-grained control over potential ;; conflicts