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
|
- To: "pari-users@pari.math.u-bordeaux.fr" <pari-users@pari.math.u-bordeaux.fr>
- Subject: recursive inline functions
- From: Max Alekseyev <maxale@gmail.com>
- Date: Sat, 14 Jun 2014 00:16:45 -0400
- Delivery-date: Sat, 14 Jun 2014 22:10:26 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=AVfeCf+Fo+ypSaNu20Ha7RqGvRe7i9MreOYhc44B0fI=; b=deNpJoPeDhMOJiCySz3igP9aoHZdGhqzudr75H7ERCW0YpOTn61cVqqocVm6tj4RWt /U5nWr5Aivp6GM8NHVT2eB9qE45tEtiFPfesBM2FZ90QX/LwXi1iRu47N1/NszF2kwbZ cMpdACLxUwOgQqfiaiyQHXS+pPz3K6u5fiF1dhJm84IArmcXuxQTUbk0npfQNuYC9vs6 JJZiO9gIZsSb1UZQ94KO2erWq6fgnsbnyJOOO9gUPP04XPx6l0Y41L8fno800bWFX5RV +p5DRK/iTNJb4C+4iGCRvmZcLHYaKC5VfESNTSGVXgTXrt8O63e1ptDpOb64jPTSEy7C wT8Q==
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