develooper Front page | perl.perl6.users | Postings from July 2021

Re: How do a pe-salt an array inside an object?

Thread Previous | Thread Next
From:
Bruce Gray
Date:
July 6, 2021 20:23
Subject:
Re: How do a pe-salt an array inside an object?
Message ID:
BCC700B2-34D1-4A5F-BAB3-21210C6B7944@acm.org


> On Jul 6, 2021, at 3:10 PM, Tom Browder <tom.browder@gmail.com> wrote:
> 
> On Tue, Jul 6, 2021 at 14:53 ToddAndMargo via perl6-users <perl6-users@perl.org> wrote:
> ...
> writing out 2000 skips is not practical.
> 
> Todd, why don't you tell us what you're really trying to do, i.e., what is your use case? Maybe the experts can suggest a better class design.
> 
> -Tom

I also would prefer seeing a use case.

In the meantime:
	my @will_become_I_soon;
	@will_become_I_soon[400]  = "four hundred";
	@will_become_I_soon[2000] = "two thousand";
	my $CC = AA.new( I => @will_become_I_soon );
or
	my $CC = AA.new( I => [ flat( Str xx 400, "four hundred", Str xx 2000-400-1, "two thousand" ) ] );

-- 
Hope this helps,
Bruce Gray (Util of PerlMonks)


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About