resume in runtime repl
parent
841f12e09a
commit
29f13113f7
@ -1,3 +1,12 @@
|
||||
#lang br
|
||||
(provide current-basic-port)
|
||||
(define current-basic-port (make-parameter #f))
|
||||
(require (prefix-in basic: (submod "main.rkt" reader)))
|
||||
(provide current-basic-port configure-repl!)
|
||||
|
||||
(define current-basic-port (make-parameter #f))
|
||||
|
||||
(define (configure-repl!)
|
||||
;; wrap REPL interactions with pollen expression support
|
||||
(define racket-read (current-read-interaction))
|
||||
(define (basic-read src in)
|
||||
(basic:read-syntax src in))
|
||||
(current-read-interaction basic-read))
|
@ -1,3 +1,6 @@
|
||||
#lang br
|
||||
(require basic-demo-3/sample-var)
|
||||
(* a a)
|
||||
(require "sample-export.rkt")
|
||||
f
|
||||
a
|
||||
b
|
||||
(f a b)
|
@ -0,0 +1,8 @@
|
||||
#lang basic-demo-3
|
||||
5 x = 5
|
||||
10 def f(x, y) = x * y
|
||||
20 print f(9, f(4,5)) : print x
|
||||
30 print 42 : require math/number-theory
|
||||
40 print prime?(15)
|
||||
50 require racket/base
|
||||
60 print max(2, 4, 10, 8)
|
Loading…
Reference in New Issue