Max Alekseyev on Sat, 14 Jun 2014 22:10:26 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

recursive inline functions


Hello!

Is this an expected behavior?

? inline(f)
? f(n) = if(n>1,n*f(n-1),1)
%2 = (n)->my(f=0);if(n>1,n*f(n-1),1)
? f(10)
  ***   at top-level: f(10)
  ***                 ^-----
  ***   in function f: if(n>1,n*f(n-1),1)
  ***                           ^---------
  ***   not a function in function call
  ***   Break loop: type 'break' to go back to GP prompt
break>


Regards,
Max