Last active
November 28, 2015 17:22
-
-
Save eshamster/a8f853703426a711986e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#|-*- mode:lisp -*-|# | |
#| | |
exec ros -Q -- $0 "$@" | |
|# | |
(eval-when (:compile-toplevel :execute :load-toplevel) | |
(ql:quickload :ps-experiment) | |
(ql:quickload :cl-js)) | |
(pse:defstruct.ps parent | |
(a 10) | |
b) | |
(pse:defstruct.ps (child (:include parent)) | |
(c 30)) | |
(pse:defstruct.ps hamster a b) | |
(defun main (&rest argv) | |
(declare (ignorable argv)) | |
(cl-js:run-js | |
(pse:with-use-ps-pack (:this) | |
(defvar x (make-child :b 20)) | |
(print (child-a x)) ; => 10 | |
(print (parent-a x)) ; => 10 | |
(setf (child-a x) 50) | |
(print (child-a x)) ; => 50 | |
(print (child-b x)) ; => 20 | |
(print (child-c x)) ; => 30 | |
(print (parent-p x)) ; => true | |
(print (child-p x)) ; => true | |
(print (hamster-p x)); => false | |
))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment