Code: Select all
(define (user-symbols)
(local (_func _other)
(setq _func '())
(setq _other '())
(dolist (_el (symbols))
(if (and (lambda? (eval _el))
(not (= _el 'user-symbols)))
(push _el _func -1))
(if (and (not (lambda? (eval _el)))
(not (primitive? (eval _el)))
(not (protected? _el))
(not (global? _el))
(not (= _el '_func))
(not (= _el '_other))
(not (= _el '_el)))
(push _el _other -1))
)
(list _func _other)
)
)
; from a fresh REPL of newLISP
(user-symbols)
;-> ((module) ())