Skip to content

Instantly share code, notes, and snippets.

const cons = (head, tail) =>
bool => bool ? head : tail
const head = pair => pair(true)
const tail = pair => pair(false)
const pairToString = pair => "(" + head(pair) + "," + tail(pair) + ")"
const myPair = cons(1, 2)
console.log(pairToString(myPair))
@intarga
intarga / compphys_assessment_5.py
Last active May 26, 2024 04:52
A python program to simulate a radioactive decay chain by Monte Carlo and Scipy numerical methods, and graph the results against the analytical solution
from __future__ import division
import numpy
import matplotlib.pyplot as pyplot
import scipy.integrate
import random
USER = "Aaron Abraham"
USER_ID = "ztjd74"
t_half_rad = 20.8 #initial conditions