on master help sign in
Remove old JS dropWhen/keepWhen
50bc5a4Max New
libraries/Native/Signal/Signal.js−9
@@ -127,12 +127,6 @@ Elm.Native.Signal.make = function(elm) {
127 input.kids.push(this);
127 input.kids.push(this);
128 }
128 }
129
129
130− function dropWhen(s1,b,s2) {
131− var pairs = lift2( F2(function(x,y){return {x:x,y:y};}), s1, s2 );
132− var dropped = new DropIf(function(p){return p.x;},{x:true,y:b},pairs);
133− return lift(function(p){return p.y;}, dropped);
134− }
135−
136 function timestamp(a) {
130 function timestamp(a) {
137 function update() { return Utils.Tuple2(Date.now(), a.value); }
131 function update() { return Utils.Tuple2(Date.now(), a.value); }
138 return new LiftN(update, [a]);
132 return new LiftN(update, [a]);
@@ -225,9 +219,6 @@ Elm.Native.Signal.make = function(elm) {
225 keepIf : F3(function(pred,base,sig) {
219 keepIf : F3(function(pred,base,sig) {
226 return new DropIf(function(x) {return !pred(x);},base,sig); }),
220 return new DropIf(function(x) {return !pred(x);},base,sig); }),
227 dropIf : F3(function(pred,base,sig) { return new DropIf(pred,base,sig); }),
221 dropIf : F3(function(pred,base,sig) { return new DropIf(pred,base,sig); }),
228− keepWhen : F3(function(s1,b,s2) {
229− return dropWhen(lift(function(b){return !b;},s1), b, s2); }),
230− dropWhen : F3(dropWhen),
231 dropRepeats : function(s) { return new DropRepeats(s);},
222 dropRepeats : function(s) { return new DropRepeats(s);},
232 sampleOn : F2(sampleOn),
223 sampleOn : F2(sampleOn),
233 timestamp : timestamp
224 timestamp : timestamp