Arc Forumnew | comments | leaders | submitlogin
5 points by nostrademons 6117 days ago | link | parent

Haven't tried it, but I believe this is what the `sig` global hashtable is for. It stores a mapping of all defined functions to their signatures...


1 point by parenthesis 6117 days ago | link

Yes:

  (sort (fn (x y) (< (coerce x 'string) (coerce y 'string))) (keys sig))
(As it says in the link, first comment out

  ;(aload "libs.arc")
in as.scm for just the basic arc.arc functions and macros.)

-----

4 points by hakk 6117 days ago | link

Shorter:

    (sort (compare < [coerce _ 'string]) (keys sig))

-----

4 points by fallintothis 6116 days ago | link

Shorter:

  (sort < (keys sig))
< compares symbols as it would strings.

-----

1 point by sjs 6117 days ago | link

Cool, not just functions but macros too.

-----