resume in runtime repl
parent
841f12e09a
commit
29f13113f7
@ -1,3 +1,12 @@
|
|||||||
#lang br
|
#lang br
|
||||||
(provide current-basic-port)
|
(require (prefix-in basic: (submod "main.rkt" reader)))
|
||||||
(define current-basic-port (make-parameter #f))
|
(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
|
#lang br
|
||||||
(require basic-demo-3/sample-var)
|
(require "sample-export.rkt")
|
||||||
(* a a)
|
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