diff options
| author | Gubolin <gubolin@fantasymail.de> | 2015-01-03 11:24:35 +0100 |
|---|---|---|
| committer | Gubolin <gubolin@fantasymail.de> | 2015-01-03 11:24:35 +0100 |
| commit | 4bb6d3c0e3af8c379d6a63934110cde1a8e31449 (patch) | |
| tree | 52b287d291b69d87ad72db2ea81fae8ba5ef0aaa /lists.js | |
| parent | 618e034eb86b3ad7e7f4955b900862a27a0ce44c (diff) | |
| parent | 0a239b703c8c7fde5540ce63c4236522a22ee049 (diff) | |
| download | snap-4bb6d3c0e3af8c379d6a63934110cde1a8e31449.tar.gz snap-4bb6d3c0e3af8c379d6a63934110cde1a8e31449.zip | |
merge upstream
Diffstat (limited to 'lists.js')
| -rw-r--r-- | lists.js | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -61,7 +61,7 @@ PushButtonMorph, SyntaxElementMorph, Color, Point, WatcherMorph, StringMorph, SpriteMorph, ScrollFrameMorph, CellMorph, ArrowMorph, MenuMorph, snapEquals, Morph, isNil, localize, MorphicPreferences*/ -modules.lists = '2014-July-28'; +modules.lists = '2014-November-20'; var List; var ListWatcherMorph; @@ -125,6 +125,9 @@ List.prototype.changed = function () { List.prototype.cons = function (car, cdr) { var answer = new List(); + if (!(cdr instanceof List || isNil(cdr))) { + throw new Error("cdr isn't a list: " + cdr); + } answer.first = isNil(car) ? null : car; answer.rest = cdr || null; answer.isLinked = true; |
