Skip to content

Instantly share code, notes, and snippets.

Array(4).fill()
.map(_ => _ => Promise.all(Array(2).fill().map(x => fetch('example.com').then(resp =>resp.json()))).then(arrJson=>console.log(arrJson)))
.reduce((prev, curr) => prev.then(curr), Promise.resolve())
import math
F = lambda x: 1/((1+math.sin(2*x))**2)
def rectangle_method(a, b, E, c):
n = 2
JN1 = 0
while 1:
h = (b - a)/n
x = a + c*h
S = 0
for i in range(n):