Nice find! :-) On Tue, Feb 6, 2024, 7:14 PM Luis Mochan <moc...@icf.unam.mx> wrote:
> On Tue, Jan 30, 2024 at 09:40:59PM -0600, Luis Mochan wrote: > > ...> > > On Mon, Jan 29, 2024 at 10:19:56PM -0500, David Mertens wrote: > > > Hello Luis, > > > > > > Ever crafty, Perl gives you another way to solve this. You could put > your > > > functions under another name space and invoke them by explicitly > naming the > > > package and function. For example, if you have a function "do_it" in > > > package MY, you could invoke it as > > > > > > $pdl->MY::do_it(...args...) > > > > > Found another alternative, as in: > my $f=sub($x){$x**2}; #or $f=sub{$_[0]**2}; > print sequence(10)->$f; > Curiously, it works in general but not the sub($x){...} in the pdl REPL. > > > -- > > o > W. Luis Mochán, | tel:(52)(777)329-1734 /<(*) > Instituto de Ciencias Físicas, UNAM | fax:(52)(777)317-5388 `>/ /\ > Av. Universidad s/n CP 62210 | (*)/\/ \ > Cuernavaca, Morelos, México | moc...@fis.unam.mx /\_/\__/ > GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16 C2DF 5F0A C52B 791E B9EB >
_______________________________________________ pdl-general mailing list pdl-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pdl-general