Skip to content

Commit

Permalink
changed the semantics of empty list-type slots to return a new empty …
Browse files Browse the repository at this point in the history
…list instead of "nothing"
  • Loading branch information
jmoenig committed Jul 12, 2023
1 parent a764dd1 commit 2ec1d88
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
* RUN/CC and CALL/CC primitives have been deprecated and removed from the palette, will still be present and work in existing projects
* changed the first input slot of the "reshape" block from "list" type to "any" type
* changed JOIN, APPEND and COMBINATIONS to show "with" infix label in between inputs, and to collapse from 2 inputs directly to "input list" case, same as +, min, AND etc. (monadic uses in existing projects will not change)
* dragging blocks and scripts out of balloons and watchers now only includes the surrounding ring if it has formal parameters
* dragging blocks and scripts out of balloons and watchers now only includes the surrounding ring if it has formal parameters
* changed the semantics of empty list-type slots to return a new empty list instead of "nothing"
* improved browser resource management for graphics and sounds
* changed long-form input dialog setting's behavior to automatically expand / collapse slot type view
* slightly optimized pen drawing performance when WARPed
Expand Down Expand Up @@ -80,6 +81,7 @@
* German translation update for "uniques" selector
* v9-rc7
* blocks: replaced the variadic black "ladder" symbol with a white vertical ellipsis label
* blocks: changed the semantics of empty list-type slots to return a new empty list instead of "nothing"

### 2023-07-11
* blocks, symbols, gui: design overhaul of variadic input slots
Expand Down
4 changes: 4 additions & 0 deletions src/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -9394,6 +9394,10 @@ ArgMorph.prototype.render = function (ctx) {

// ArgMorph evaluation

ArgMorph.prototype.evaluate = function () {
return this.type === 'list' ? new List() : null;
};

ArgMorph.prototype.isEmptySlot = function () {
return this.type !== null;
};
Expand Down

0 comments on commit 2ec1d88

Please sign in to comment.