julia> function baz(flag)
           function qux(a)
               "generic"
           end
           if flag
               function qux(a::Uint8)
                   "Uint8"
               end
           end
           qux
       end
baz (generic function with 1 method)

julia> baz(false)(0x1)
"generic"

julia> baz(true)(0x1)
"Uint8"

[giggles]

Reply via email to