function
boot.janet on line 3227 , column 1
(all-bindings &opt env local )
Get all symbols available in an environment. Defaults to the
current fiber 's environment. If `local` is truthy , will not show
inherited bindings (from prototype tables ).
(->> (all-bindings )
(keep (fn [sym ]
(when (string/has-prefix? "peg/" (string sym ))
(string sym ))))
sort )
# =>
@["peg/compile"
"peg/find"
"peg/find-all"
"peg/match"
"peg/replace"
"peg/replace-all" ]
# from https://github.com/sogaiu/margaret/blob/master/tutorials/tutorial.janet
(pp (all-bindings ))
# => prints @[% %= * ... yield zero? zipcoll]
(def a "A" )
(pp (all-bindings (curenv ) true ))
# => prints @[_ a] - only local bindings are listed
(filter (partial string/has-prefix? "z" ) (all-bindings )) # => @[zero? zipcoll]