3 ms·
Scratch 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
by toontalk 7y ago
Scratch 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.