[8/8]
CLOSED: [2020-03-31 Di 23:07]
(define add-2 ()) (+ 2 (call/cc (lambda (cont) (set! add-2 cont) 3))) ;; = 5 (add-2 10) ;; 12 (add-2 100) ;; 102
CLOSED: [2020-03-29 So 20:00]
CLOSED: [2020-03-29 So 20:01]
[8/8]
CLOSED: [2020-03-29 So 20:49]
define-syntax -> define-macro
mutate -> mutate!
pair -> cons
first -> car
rest -> cdr
generate-docs -> generate-docs-file
break -> show-environment
mytry -> attempt
CLOSED: [2020-03-29 So 21:00]
CLOSED: [2020-03-29 So 21:27]
CLOSED: [2020-03-29 So 21:27]
CLOSED: [2020-03-31 Di 11:36]
CLOSED: [2020-03-31 Di 11:58]
CLOSED: [2020-03-31 Di 11:58]
define a %lo to print Lisp_Objects
print("The value of node is: %lo", node); // 이렇게
SLIME_UNICODE
SLIME_WINDOWS
SLIME_LINUX
SLIME_DEBUG
SLIME_RELEASE
SLIME_DISTRIBUTE
because all the args are in last of pcs, so we can assert length
(define-syntax-shorthand [ vector ] ) (define-syntax-shorthand { hash-map } )
use the stack to store immediate results, so no captures are necessary
let a cont have a not expanded macro in cs and before calling the cont, expand the macro and let it bake in
(let fac ([n 10]) (if (zero? n) 1 (* n (fac (sub1 n))))) 3628800
(eval `(+ . ,(list 1 2 3))) ;; should output 6 ;; throws error instead
(begin (define a (list 1 2 3)) (eval `(+ . ,a))) ;; should output 6 ;; outputs 0
define((test val),"") { fetch(val) ; printf("addr of arg: %lld\n", (unsigned long long)&val); return Memory::nil; };
then:
(define a "a") (test a) ;; will output an adress (if 1 (test a) 2) ;; will output a different adress
(define (range (:from 0) to) ...)
should error since we can't have positional args after keywords. right now, 'to' is silently ignored..