This file contains hidden or 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
| fizz = function f() { | |
| fizz = function () { | |
| fizz = function () { | |
| fizz = f | |
| return "Fizz" | |
| } | |
| } | |
| } | |
| buzz = function f() { |
This file contains hidden or 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
| ((f,N)=>f(f,N))((g,i)=>i?g(g,i-1).concat((i%3?"":"fizz")+(i%5?"":"buzz")||i):[],100) |
This file contains hidden or 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
| ((f,l)=>f(f,l))(((f,l,m=l[l.length-1])=>m!==1?f(f,l.concat(m%2?3*m+1:m/2)):l), [27]) |
This file contains hidden or 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
| // https://twitter.com/tatsuosakamoto/status/1299922512474640387 | |
| (()=>{ | |
| let strategy = [[]]; | |
| let answer = []; | |
| // register approaches to strategy | |
| for(let i=0;i<5;i++){ |
This file contains hidden or 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
| s / t | |
| where t ≠ 0 | |
| s / t = As / At | |
| where 1 / 2 <= At < 1 | |
| As / At = As / {1-(1-At)} | |
| ∴ 0 < (1-At) <= 1 / 2 | |
| As / {1-(1-At)} = As*{1+(1-At)} / {1-(1-At)^2} |
This file contains hidden or 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
| ((l,r)=>{for(;r-l>1e-15;t>0?l=m:(r=m))for(s=m=t=(l+r)/2,i=1;s;t+=s)s*=-m*m/++i/++i;return m})(3,4) |
This file contains hidden or 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
| (s=>{p=[];for(i=2;i<s;f||p.push(i),i++)for(j=f=0;p[j]*p[j]<=i;j++)f|=!(i%p[j]);return p})(10000) |
This file contains hidden or 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
| (x=>{for(t=1;t>1e-16;x+=t)for(i=1,s=t=x;s;t+=s)s*=-x*x/++i/++i;return x})(3) |
This file contains hidden or 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
| ((s,n)=>{t=".".repeat(s[0].length>>1);for(i=0;i<n;i++)s=s.map(e=>t+e+t).concat(s.slice(1).map(e=>e+e.slice(1))),t+=t;return s.join("\n")})(["..▽..",".▽.▽.","▽▽▽▽▽"],4) |
This file contains hidden or 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
| (f) => ((x) => x(x))((x) => setTimeout(() => f(x(x)), interval)) // interval is given from anywhere |
OlderNewer