# What does the pipe block do

I have the manual and it isn’t very good at describing what the block actually does

Same with continuations, it’s not very good at explaining it

Personally, the only thing I use continuations for is the "catch (tag)" block.

If you're a new user, then I'd suggest not trying to use continuations (I still don't understand them). You'll be able to do most things without them anyway. As for pipe, it puts the input into the first grey ring, just like with call with inputs, then it puts the result from the first block, and puts it into the second block. It repeats until there is no other blocks, then it reports the final result.

Wait what?

Have not read the manual for 3 years?

If you load an old version of snap the you can find the non-primitive pipe.Then you can inspect it.

A continuation is the rest of the script that will be executed.

say [Before continuation]
run (script) w/ continuation
say [I'm the continuation!]


In this example, the run w/ continuation block runs script and gives it one value just like run with inputs (right arrow-head of the regular run block). That one value is the continuation, and in this example, it is the say [I'm the continuation!] block of the script. Inside script, if it runs the continuation, it will skip the rest of script and jump to the say [I'm the continuation!] block.

What makes continuations cool is that you can run one more than once. :~)

So basically a multi call?

I guess so. If you look at my example, you should understand how it works.

Thanks!

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