Created
December 4, 2016 15:35
-
-
Save notgiorgi/7a1549e13f5cbcd005bb8736efbba818 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
((foo,p,list1,list2) => | |
(foo = (x,y = x * 2) => | |
function bar(z,baz,obj) { | |
if (z.length > 3) { | |
return z.map( baz = v => | |
v > 3 ? v + y : baz( v * 4 ) | |
); | |
} | |
else { | |
obj = []; | |
setTimeout( () => | |
(obj.length = 1, | |
obj[0] = this.w) | |
, 100 | |
); | |
return obj; | |
} | |
}, | |
p = foo( 2 ), | |
list1 = [1,3,4], | |
list2 = list1.concat( 6 ), | |
list1 = p.call( { w: 42 }, list1 ), | |
list2 = p( list2 ), | |
setTimeout( () => | |
console.log( list1[0] === list2.reduce( (s,v) => s + v, 0 ) ) | |
, 200 | |
)) | |
)(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment