Hope that when this is all finished, there could be a blog explaining this 
new feature, which solves the closure problem!

On Tuesday, January 26, 2016 at 7:29:23 PM UTC+1, Stefan Karpinski wrote:
>
> Currently, yes. This will change very soon.
>
> On Tue, Jan 26, 2016 at 1:24 PM, Sisyphuss <zhengw...@gmail.com 
> <javascript:>> wrote:
>
>> I have the following code:
>>
>> function factorial(n)
>>   function fact_iter(product, counter, max_count)
>>     if counter > max_count
>>       product
>>     else
>>       fact_iter(product * counter, counter + one(counter), max_count)
>>     end
>>   end
>>
>>   fact_iter(one(n),one(n),n)
>> end
>>
>> By `@code_warntype factorial(10)`, it is "end::Any", which means type 
>> instable.
>>
>> However, if I move the definition of `fact_iter` outside, it will get 
>> "end::Int64", which means type stable.
>>
>
>

Reply via email to