-> (use finance.smt) -> (val account (initialBalance: FinancialHistory 1000)) -> (spend:for: account 50 #plumber) -> (receive:from: account 400 #salary) -> (cashOnHand account) 1350 -> FinancialHistory -> (new FinancialHistory) -> (isKindOf: FinancialHistory Class) -> (isKindOf: (new FinancialHistory) Class) -> (isKindOf: FinancialHistory Object) -> (isKindOf: (new FinancialHistory) Object) -> (val myaccount (initialBalance: FinancialHistory 1000)) -> (spend:for: myaccount 50 #insurance) -> (receive:from: myaccount 200 #salary) -> (cashOnHand myaccount) 1150 -> (spend:for: myaccount 100 #books) -> (cashOnHand myaccount) 1050 -> (val myaccount (initialBalance: DeductibleHistory 1000)) -> (spend:for: myaccount 50 #insurance) -> (receive:from: myaccount 200 #salary) -> (cashOnHand myaccount) 1150 -> (totalDeductions myaccount) 0 -> (spend:deduct: myaccount 100 #mortgage) -> (cashOnHand myaccount) 1050 -> (totalDeductions myaccount) 100 -> (spend:for:deduct: myaccount 100 #3-martini-lunch 50) -> (cashOnHand myaccount) 950 -> (totalDeductions myaccount) 150 -> (class C Object () (method m1 () (m2 self)) (method m2 () #C)) -> (class D C () (method m2 () #D)) -> (val x (new D)) -> (m1 x) D -> (isKindOf: 3 Number) -> (isMemberOf: 3 Number) -> (isKindOf: #3 Number) -> (val index 0) -> [(set index (+ index 1))] -> index 0 -> (value [(set index (+ index 1))]) 1 -> (val incrementBlock [(set index (+ index 1))]) -> (val sumBlock [(+ sum (* index index))]) -> (val sum 0) 0 -> (set sum (value sumBlock)) 1 -> (value incrementBlock) 2 -> (set sum (value sumBlock)) 5 -> (if (< sum 0) [#negative] [#positive]) positive -> (if (< sum 0) #negative #positive ) run-time error: Symbol does not understand message value -> (while [(< sum 10000)] [(set sum (* 5 sum)) (println sum)]) 25 125 625 3125 15625 nil -> (val s (new Set)) Set( ) -> (size s) 0 -> (add: s 2) -> (add: s #abc) -> (includes: s 2) -> (add: s 2) -> (size s) 2 -> (do: s (block (x) (println x))) 2 abc nil -> (set s (asSet #(1 2 3 1 2 3))) Set( 1 2 3 ) -> (addAll: s #(1 2 3 a b c)) ( 1 2 3 a b c ) -> (includes: s #b) -> (size s) 6 -> (val s2 (reject: s (block (x) (isKindOf: x Number)))) Set( a b c ) -> (val l (new List)) List( ) -> (addLast: l #a) a -> (add: l #b) b -> l List( a b ) -> (addFirst: l #z) -> (first l) z -> (addFirst: l #y) -> (at: l 3) a -> (removeFirst l) y -> l List( z a b ) -> (val f1 (num:den: Fraction 2 1)) -> (val eps (num:den: Fraction 1 10)) 1/10 -> (val f2 (sqrtWithin: f1 eps)) 17/12 -> (val eps (/ 1 100)) 1/100 -> (val f2 (sqrtWithin: (asFraction 2) eps)) 577/408 -> (val eps (asFloat (/ 1 10))) 1x10^-1 -> (sqrtWithin: (asFloat 2) eps) 14166x10^-4