Bill Allombert on Thu, 17 Aug 2023 14:04:37 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
- To: pari-dev@pari.math.u-bordeaux.fr
- Subject: Re: New gp features
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
- Date: Thu, 17 Aug 2023 13:59:51 +0200
- Arc-authentication-results: i=1; smail; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1692273585; c=relaxed/relaxed; bh=6BGmD9uKZMPAwbdMjiGQgKlPzqphDKr+XBpMbinqsQE=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:Mail-Followup-To: References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; b=mJkbjZja1HH+tcw+DgmrfavVM8nStghEvnmXiQqZuTMFVVKDwJddVnCr8sYxYQq9mQMjngqHPbNn/I620vibf0G1NJiXoUTZhoQTWEU/ayWMQlrABfzbiuD+2AflR6bogGEXlVlBs4H7xSQEfhMl3BZ08vkaRieNr7+bZCo0dxEXm8xIKAxVxb/rgsHgOD+jUwqbRykEruKgG6IyYRxgf/Uf5oM41sB8K8c7UO+T4+H1E6Y7D23i7kynCf5sUT/+0t68lfUU/JIE6ZLfudyytQjeMhJy3fD85KomXd7dJ2BI4eK5034ivAj9UNsG4ZUau9bs0wjbLe10HsUpyx8unQsBJRx6Dne6cvaqQMY8j1yNZYqN7SEPx/3RK9eRfPUIH7o8US8onQo4sku8T/2LZP55JeQ/MF11++2n/z1dpfKiLoOamRljCnLS4AZOhZl+FgdUOlEjCZ9oOC7gcl4c4BupmvsjcJyczfzhoX/QDNyvWd+Rd5/4Qg8z7sq6DJ0pdTUEB2yytow88E9EmtcpyoLSz6oI3iGhwJxBXCZT/AwwQLK7ddp0e1T2xOYmSrW0Fvgqv3sRS7RNeui28SqacScY2FnEJ/uHXGCt5BjiiJT3q+w3yNgUXpebJIF84HQeOladWteA3Shk27CXp8fFuHoW2NVidQ8BmOvqXAGjT+0=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1692273585; cv=none; b=gg/48V3WN2QGC218y7zGEhLG9uqpWIesFhFXOR9Ly8zy9bwlcTKtKe6w8Ttl/em2Sn++LC+KYsiI8461Cea1LZOhf53Yl10R8R77s6tDyG3qI2QcOgHE+7G8vg7f2IpBwmbvvLqUCL+D/wlskoz7KMzKA8Dt9rHJm/AbugdfJEiFWeV3e5ZDI1iMxFbooQLvtavvc7lRyKEPux/Rv9LCnpWpBQ7gohJ8Pvsv6kxIs/uymneVediLnxB5bI6puEo1/4BCPaQFxtffvBtrmSc2PbXIPOeMAXlz4HLZb1amFGkHP3c6z4qwmUOjEyutfbGE3Ngl8FBjDXBcojSzx5Pod0ohBA6sSK8x8t+eA5D44ytrDwzM2LyZkXa5v68MJyXnQjiteqjGN/9aeuDQXBenelAOWb6co3ozL+umVLOls/HUHTLR+lqM0jewe7eY3eKQ+94H1fRk0+4HdYvb++izrznGVJIdX28Miv7KN/5jqgLasDKyavOz0C73RSTsa3yqRVCTRBIdLxXCVw/Xv/v7Mgk4OfeTcsJLPYqQNNk9Heb5+fWuO5FHt1eNKlZYDkJPRvHhmONyqKh9ifsvntvxfgbB3PxZ0JjkfZQbVee0g4dv3TXMh8nkQWfsclo3OqqetrRaLnx4hPZGTzwcTfwWI5hZsYpE+6XneVWAEL9GsZo=
- Authentication-results: smail; arc=none
- Delivery-date: Thu, 17 Aug 2023 14:04:37 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1692273585; bh=6BGmD9uKZMPAwbdMjiGQgKlPzqphDKr+XBpMbinqsQE=; h=Date:From:To:Subject:References:In-Reply-To:From; b=lbyRHrMjSIpKaW4bR1JplyDg5pEtNdNblaL9TscAOkYd1piTB6p9KIWJeHAtBK05O dhMAXap70KAZr4txXg3NGdyBYS4PMbzGoJcFySP8hpZgKXHdSofl/9irpPjQpwMZyt BP0RBucr1XziU1gQoRZuYwl1jdophA1ctLWxcbz7LrBg/int7RLehntFrSFIVinbrC gZHwBnqVSUkJx/vbdy1aIuSKX8FIiov1sBqd+R5hpSmSEmjg8SLvuAE3l/9ZyyUbQo dhB3mai6VqJrhVbgrSTG8DL2oPxVV9NJ21YrluPDx+6z8Rc3d8T+bzTkaqOT3IJw5q XVF6vfq42sFdzqPA9OxTxF55WbArP138Ljsx+SwfBkku5I+6KYK7gX4Bwh0mv5HO0v 9m5elbkRPnx7t8fXvV/R2MzEqG/+v0KPaN61eKG7gW7GV8thdqV0ej5pWfdi9iw5dL UYRe/u4Y0P2EDeHQ72nnuznYS3jEysToDPG6jhO8vQp2BB8r0yrt5A4Iw+MXuLlAOn cFidO24vJvcsLuxPmfCe5lOULnM3WrnkusnIbNm+f4+zxh6MNi92L/6CmR3yHuJg+/ J/WwGnxgzUy8sRjH87+1m/wzg1yQziVEyfDz7wjGkvYCdhcQkkh3HEKy3kwftWoNOj cQ5NPnfXhdwOY552zSrYggi4=
- In-reply-to: <eed9ff526d4d7a91a7d3505558f14d06@stamm-wilbrandt.de>
- Mail-followup-to: pari-dev@pari.math.u-bordeaux.fr
- References: <eed9ff526d4d7a91a7d3505558f14d06@stamm-wilbrandt.de>
On Sun, Aug 13, 2023 at 08:39:18PM +0200, hermann@stamm-wilbrandt.de wrote:
> Few questions:
>
> A) foreach cannot be redefined?
>
> foreach2(a,b,c) = foreach(a,b,c);
This does not work, because user GP functions are 'strict':
b and c are evaluated before foreach2 is evaluated to a closure.
Instead you can do
foreach2(a,c) = foreach(a,b,c(b))
and then
foreach2(a,t->printf("%d ",t[1]))
> B) foreach variable cannot be multi assignment tuple?
>
> ? foreach(rsa,[l,n],printf("%d ",l));
> *** variable name expected: foreach(rsa,[l,n],printf("%d ",l));
> *** ^-----------------------
No, this is not supported.
> C) holes only allowed on LHS, not on RHS?
>
> ? [a,b,c] = [1,2]
> *** at top-level: [a,b,c]=[1,2]
> *** ^--------
> *** nonexistent component: index > 2
c would not be defined.
Cheers,
Bill