You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
432 B
Racket
11 lines
432 B
Racket
9 years ago
|
#lang br
|
||
|
(provide (rename-out [simple-module-begin #%module-begin])
|
||
|
#%datum #%top-interaction)
|
||
|
(define #'(simple-module-begin expr ...)
|
||
|
#'(#%module-begin
|
||
|
(define lines (list expr ...))
|
||
|
(display (format "Expressions = ~a" (length lines)))
|
||
|
(define numbers (filter number? lines))
|
||
|
(unless (zero? (length numbers))
|
||
|
(displayln (format ", numbers = ~a" (length numbers)))
|
||
|
(apply + numbers))))
|