Reflection/Get source: Difference between revisions

Content added Content deleted
m (→‎{{header|Perl 6}}: full path is provided for built-ins)
(Adds Clojure solution)
Line 3: Line 3:
;Task:
;Task:
The goal is to get the source code or file path and line number where a programming object (e.g. module, class, function, method) is defined.
The goal is to get the source code or file path and line number where a programming object (e.g. module, class, function, method) is defined.

=={{header|Clojure}}==

<lang clojure>
; Use source function for source code.
(source println)

; Use meta function for filenames and line numbers (and other metadata)
(meta #'println)</lang>


=={{header|FreeBASIC}}==
=={{header|FreeBASIC}}==