RosettaCodeData/Task/Scope-Function-names-and-labels/Racket/scope-function-names-and-labels-2.rkt

6 lines
103 B
Racket
Raw Permalink Normal View History

2013-06-05 21:47:54 +00:00
(define (foo x)
(define (bar y) (+ x y))
bar)
(foo 1) ; => #<procedure:bar>
((foo 1) 2) ; => 3