PasteRack.org Paste # 59902 2019-04-05 00:45:22 Forked from paste # 3606. Fork as a new paste. Paste viewed 248 times. Tweet Embed:
#lang racket (define(volume-sphere radius)    (/ (* 4 3.14 radius radius radius) 3))                          (define (volume-shell inner-radius outer-radius)      (- (volume-sphere outer-radius) (volume-sphere inner-radius)))                          (volume-shell 1 2)      (volume-shell 3 5)  (define(close? number-1 number-2 limit)   (<(abs(- number-1 number-2))limit))       (close? 5 4 1)    (close? 6 3 5)  (define (how-many a b c)   (cond [(> (* b b) (* 4 a c)) "2"]         [(= (* b b) (* 4 a c)) "1"]         [(< (* b b) (* 4 a c)) "0"]))          (how-many 1 0 -1)      (how-many 2 4 2)      (define (filter-out-symbol l sym)   (cond [null? l'()]         [(eq? sym (car l)) filter-out-symbol (cdr l) sym)]         [(else (cons(car l) filter-out-symbol (cdr l) sym))])

=>

```#lang racket

(volume-shell 1 2)
(volume-shell 3 5)

(define(close? number-1 number-2 limit)
(<(abs(- number-1 number-2))limit))

(close? 5 4 1)
(close? 6 3 5)

(define (how-many a b c)
(cond [(> (* b b) (* 4 a c)) "2"]
[(= (* b b) (* 4 a c)) "1"]
[(< (* b b) (* 4 a c)) "0"]))

(how-many 1 0 -1)
(how-many 2 4 2)

(define (filter-out-symbol l sym)
(cond [null? l'()]
[(eq? sym (car l)) filter-out-symbol (cdr l) sym)]
[(else (cons(car l) filter-out-symbol (cdr l) sym))])

```

=>

```prog:27:56: read: missing `]' to close preceding `[', found instead `)'
context...: