Le lundi 26 octobre 2015 07:15:56 UTC+1, DNF a écrit :
>
> Hmm. Trying to answer myself: I guess my suggested solution would miss 
> functions that don't specify the type, but just rely on the iterable 
> behaviour.
>
>
It is easy to get the list of thunks that work on iterables.

     type Iterable x::Float64 end
    Base.start(x::Iterable) = 0
    Base.next(x::Iterable) = 0
    Base.done(x::Iterable) = true
    show(filter(s -> try
                       eval(s)(Iterable(0)) ; true
                     catch
                       false
                     end,
                names(Base)))

I am not sure how to provide default arguments for functions of several 
variables though.

Here is the list, excluding macros.

:apropos,:broadcast!_function,:broadcast_function,:conj,:ctranspose,:cycle,:deepcopy,
:display,:done,:dump,:eltype,:enumerate,:esc,:expand,:fetch,:fieldnames,:fill,:finalize,
:hash,:hcat,:htol,:identity,:info,:isbits,:isgeneric,:isimmutable,:isleaftype,:ltoh,:macroexpand,
:methods,:names,:next,:object_id,:permutations,:pointer_from_objref,:print,:println,:promote,
:promote_type,:push!,:redisplay,:repeated,:repr,:rmprocs,:show,:showall,:showcompact,
:sizeof,:start,:string,:summary,:symbol,:symdiff,:transpose,:typejoin,:vcat,:warn,:xdump,:zip

Reply via email to