在python我可以使用dir()和球拍(5.2)我可以做
(require xrepl)
,apropos
Run Code Online (Sandbox Code Playgroud)
获取所有已定义变量的列表.在所有方案中都有什么便携方法可以做同样的事情?完成后,如何过滤掉所有系统和模块变量?完整的变量列表在球拍中相当令人生畏.
要获取Racket中特定模块导出的名称,请使用module-> exports.对于其他实现,您需要在文档中查找.
> (module->exports 'racket/list)
'((0
(add-between ()) (append* ()) (append-map ())
(argmax ()) (argmin ()) (cons? ()) (count ())
(drop ()) (drop-right ()) (eighth ()) (empty ())
(empty? ()) (fifth ()) (filter-map ())
(filter-not ()) (first ()) (flatten ())
(fourth ()) (last ()) (last-pair ())
(make-list ()) (ninth ()) (partition ())
(range ()) (rest ()) (second ())
(seventh ()) (shuffle ()) (sixth ())
(split-at ()) (split-at-right ()) (take ())
(take-right ()) (tenth ()) (third ())))
'((0 (remove-duplicates ())))
Run Code Online (Sandbox Code Playgroud)