From 7838fec40e7c8cd56b6382076b05cd57394a0c33 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Fri, 17 Apr 2009 17:34:47 +0000 Subject: [PATCH] fixed typo -- using str instead of result svn: r14545 --- .../scribblings/guide/contracts-simple-function.scrbl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/collects/scribblings/guide/contracts-simple-function.scrbl b/collects/scribblings/guide/contracts-simple-function.scrbl index 592ca69f57..437f38647e 100644 --- a/collects/scribblings/guide/contracts-simple-function.scrbl +++ b/collects/scribblings/guide/contracts-simple-function.scrbl @@ -219,7 +219,7 @@ scheme (define (has-decimal? str) (define L (string-length str)) (and (>= L 3) - (char=? #\. (string-ref result (- L 3))))) + (char=? #\. (string-ref str (- L 3))))) (provide/contract (code:comment "convert a random number to a string") @@ -253,15 +253,15 @@ scheme (define (has-decimal? str) (define L (string-length str)) (and (>= L 3) - (char=? #\. (string-ref result (- L 3))))) + (char=? #\. (string-ref str (- L 3))))) (define (is-decimal-string? str) (define L (string-length str)) (and (has-decimal? str) (andmap digit-char? - (string->list (substring result 0 (- L 3)))) + (string->list (substring str 0 (- L 3)))) (andmap digit-char? - (string->list (substring result (- L 2) L))))) + (string->list (substring str (- L 2) L))))) (provide/contract ...