PasteRack.org
Paste # 34072
2019-04-05 00:51:52

Forked from paste # 59902.

Fork as a new paste.

Paste viewed 257 times.


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))])
        
        

=>

prog:27:56: read: missing `]' to close preceding `[', found instead `)'
  context...:
   /home/pasterack/racket68/collects/syntax/module-reader.rkt:190:25: loop
   /home/pasterack/racket68/collects/syntax/module-reader.rkt:183:2: wrap-internal
   /home/pasterack/racket68/collects/racket/../syntax/module-reader.rkt:65:9: lang:read-syntax
   /home/pasterack/racket68/share/pkgs/scribble-lib/scribble/private/manual-code.rkt:112:0: get-tokens
   /home/pasterack/racket68/share/pkgs/scribble-lib/scribble/private/manual-code.rkt:56:0: typeset-code15
   /home/pasterack/pasterack/tmp/34072/34072code.scrbl: [running body]
   loop
   ...cket/cmdline.rkt:179:51
   /home/pasterack/racket68/share/pkgs/scribble-lib/scribble/run.rkt: [running body]