How do we map list over list

By the way, how do i make map list items to repeat?

I made this:

untitled script pic (27)

But it is much slower than:

untitled script pic (26)

Wait... it is much slower even without them repeating... What is happening here


untitled script pic (30)

untitled script pic (31)

The great thing about computer programming as a thing to study is that you don't have to guess if you've done it right or wrong. You just run the program. If you get the answer you expected, you did it right. (But be sure to test edge cases such as empty lists as input.) None of that tugging on the teacher's sleeve saying "Is this right?" And if it's not right, you just keep trying until it is.

As for whether something can be done more easily, or more elegantly, the answer is almost certainly yes, until you take Algorithms and Data Structures, the second or third CS class in college. But that's okay; you don't ever want to run out of things to learn.

You seem to have answered your own question, in your implementation of MULTIMAP. But I'm not sure I understand what it's supposed to do. Maybe if you give an example of using it?

I don't see why you need the inner CALL, but then, I don't really understand what you're trying to do. You can speed up your procedure by compiling the MAP. (Right-click on that MAP block and choose Compile from the menu.)

This works as well:

or:

it is still much slower than my implementation without call, but that is cool

Something tells me it could possibly be the “numbers 1 to 100000” block that is making it lag
I have no idea why though just a hunch

I don’t even understand why that’s necessary to have there
Oh I get it now, it’s going through every item in a list of 100,000 numbers and subtracting them by 1 and adding 1 all in 1 frame
I wonder why it could possibly be lagging
(This is all satire)

Sherlock, just think why i used numbers to 1 to 100000? Right, to compare speed of 2 different custom blocks doing the same thing.

It was a satire informative post
No matter what it’s gonna lag because it needs to call that list

why cant be mine be satire either?

I mean there was no indication it was

if there is no indication of sarcasm it doesnt mean it cant be sarcasm
(basics of logic)

C'mon, you two, stop trying to one-up each other. You both know what each other means.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.