Skip to content
Discussion options

You must be logged in to vote

How about this?

(defn hello
  `Evaluates to "Hello!"`
  []
  "Hello!")

(def my-env (curenv))

(defn main
  [& args]
  (print (hello))
  (repl nil nil my-env))

With that I get the following sort of result:

$ ./build/hello
Hello!
repl:1:> (hello)
"Hello!"

On a side note, I found this chapter of "Janet for Mortals" to have bits in it that helped me to understand getting this kind of thing to work.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by tttuuu888
Comment options

You must be logged in to vote
2 replies
@sogaiu
Comment options

@tttuuu888
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants