State of the environment/Reflection

32 views
Skip to first unread message

florian wagner

unread,
Feb 21, 2017, 3:38:37 PM2/21/17
to Extempore
Hi all

So I presented extempore in my course and one question came up:
Is there a built-in way to see the current state of the system (defined functions and values)?
Or would one have to build such functionality from scheme primitives?

Greetings,
Florian

Andrew Sorensen

unread,
Feb 21, 2017, 6:15:55 PM2/21/17
to extemp...@googlegroups.com
Hey Florian,

I think what you might be looking for is something like this:

(bind-func myfunc
  (lambda (x)    
    (* x 2)))

(bind-val myval i64 5)

(println (xtmdoc-documentation-function "myval"))
(println (xtmdoc-documentation-function "myfunc"))
;; now print everything!
;; which returns an associative list that you can search
(println (xtmdoc-all-doc-alists #t))



???

Cheers,
Andrew.

--
You received this message because you are subscribed to the Google Groups "Extempore" group.
To unsubscribe from this group and stop receiving emails from it, send an email to extemporelang+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

florian wagner

unread,
Feb 24, 2017, 12:31:35 PM2/24/17
to Extempore
Hey Andrew,

that seems to be exactly what I was looking for, thank you very much!

Greetings,
Florian
To unsubscribe from this group and stop receiving emails from it, send an email to extemporelan...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages