On Tuesday, January 5, 2016 at 3:23:14 AM UTC-5, Ismael Venegas Castelló
wrote:
> Why force `methods` to work with anything?
>
Because you can call anything:
julia> call(x::Char) = x+1
call (generic function with 1038 methods)
julia> 'c'()
'd'
julia> methods('c')
1-element Array{Any,1}:
call(x::Char) at none:1
There's been a much stronger push for documenting the external interfaces,
but there's more and more internal developer documentation these days, too
(http://docs.julialang.org/en/latest/devdocs/julia/). It's getting better.
I believe flisp.boot is a generated file.
Builtins are simply functions (and types) that are written in C; necessary
for bootstrapping. You can find the mapping between their Julia names and
the C definitions
here:
https://github.com/JuliaLang/julia/blob/baf174f5c252a438006c6f23ed7097fbab004025/src/builtins.c#L1202-L1284.
Search for their C names to find their definitions. They accept any
number of Any arguments within their function definitions, but those that
require a certain number of arguments have error checking within the C
function.
Also note that anonymous functions have the type `Function`, too. The
introspection utility you want is `isgeneric`. I imagine lots of this will
change with the jb/functions branch, where all functions are generic.