Just some blocks!

What they mean is adding a comment to the custom block itself. For example

{test block} :: define+ /* Thanks to @... for the block */

okay i add it and i credit you to the project

oh okay

I love spuares and specturms

image

factorials that lag

image

and non-number numbers

image

But still, some of these blocks are actually really cool! Thanks!!!

The factorial was a problem with my gamma block.

It was meant to say

<[] = [0] $<:>

But I accidentally said

<(()mod (1)) = [0] $<:> > = [0] $<:>


This is by me.
@askofep1 Prefers termials, with the notation n? . I use the notation of any triangular number, T_n .

This is also by me:


But this version has a bug!
Take this one:

thank you

is javascript really neccesary? I thought :snap: had blocks like define ((block)) [] (()@>) and set [ V] of block (()@>) to []!

for this block yes

Oh, right, it’s because of the spec parameter! Well… wouldn’t it be possible to create the block with spec using JS, and modify everything else with Snap? (It’s fine if it’s impossible/too hard, don’t worry!)

Isn’t the spec the same as the selector?

uhhh… no? selector is how SNAP knows which primitive is which. spec is the internal representation of the block label:

okay what blocks do i need to fix?

new blocks!

By the way, this is my NEVER block
just some blocks script pic (7)

okay i credit it

Thx!

np (no problem)

Here’s a tip:

In Snap!, lists are mutable. So


deletes it from both a AND b, as they both point to the same object in memory.
You can get around this by copying a list (done with just some blocks script pic (10))
so that they reference something different:

And that works! Usually, if a list block is a reporter/predicate, it doesnt change the list put in. If it’s a command, it does.

Your block: ALL BUT LAST OF has an issue.


!!! The original list was mutated!
You can change the definition to copy it, though:

And it works ;)

or ([id V] of (list)).

The definition could be simpler too:

report ([reverse V] of (all but first of ([reverse V] of (list))))