4 ms·
Scratch does allow you to make your own blocks with optional input. My math students use them to learn about abstraction. The most recent implementation was rel
by ngmc 7y ago
Scratch does allow you to make your own blocks with optional input. My math students use them to learn about abstraction. The most recent implementation was released last winter and is written in JavaScript.
https://en.scratch-wiki.info/wiki/Scratch_3.0 https://en.scratch-wiki.info/wiki/Scratch_3.0
- toontalk 7y agoScratch 3 does not enable one to define new functions only new commands. Snap! user-defined functions are first-class - they can be used to define higher-order functions.
- DonHopkins 7y agoHere's the elegant Snap! visual Y Combinator: https://imgur.com/cOq8tvR https://imgur.com/cOq8tvR Visual Lambda: Note how the gray block after the "report", shrink-wrapped around the "call (fn) with inputs (fn) []", is a visual "lambda". It looks like a "gasket" or "baggie" that insulates the code inside from being immediately evaluated, returning a closure instead.