We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
You can set prototype of a function when constructing class.
My attempt to create class macro:
(define-macro (define-class spec . body) (let* ((class (gensym)) (constructor-s (string->symbol "constructor")) (constructor (find-first (lambda (x) (eq? (car x) constructor-s)) body))) `(let ((,class (lambda ,@(cdr constructor)))) (set-obj! ,class 'prototype (--> Object (create ,(cadr spec)))) (define-global ,(car spec) ,class))))
code:
(set-obj! ,class 'prototype (--> Object (create ,(cadr spec))))
don't work you get error that function is not an object.
The text was updated successfully, but these errors were encountered:
it should use typecheck('set-obj!', obj, ['function', 'object']) Pair is also object according to object same as Macros.
typecheck('set-obj!', obj, ['function', 'object'])
Sorry, something went wrong.
LIPS Object System (new features + macro helper) - fix #19 #18
6ebc898
No branches or pull requests
You can set prototype of a function when constructing class.
My attempt to create class macro:
code:
don't work you get error that function is not an object.
The text was updated successfully, but these errors were encountered: