Last active
August 29, 2015 14:16
-
-
Save Vaguery/a6706bbf31615e096dec to your computer and use it in GitHub Desktop.
dependency on Clojush interpreter only
This file contains hidden or 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
| (ns lexicase-redux.core) | |
| (use 'midje.sweet | |
| '(clojush interpreter pushstate) | |
| '(clojush.instructions boolean code common numbers random-instructions string char vectors tag zip return input-output)) | |
| ;; ... | |
| (println (run-push '(1 2 integer_add false true boolean_or "foo bar" string_length) (make-push-state))) | |
| ;; prints: | |
| ;; #clojush.pushstate.PushState{:exec (), :code nil, :integer (7 3), :float nil, :boolean (true), | |
| ;; :char nil, :string (), :zip nil, :vector_integer nil, :vector_float nil, :vector_boolean nil, | |
| ;; :vector_string nil, :input nil, :output nil, :auxiliary nil, :tag nil, :return nil, | |
| ;; :environment nil, :termination :normal} | |
| ;; | |
| ;; as expected! (7 = length of "foo bar", 3 = 1+2, true = false OR true) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment