Skip to content

Instantly share code, notes, and snippets.

vaz vaz

Block or report user

Report or block vaz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
safiire / dual.h
Created Oct 11, 2016
My Dual Number implementation
View dual.h
#pragma once
#include <iostream>
#include <cmath>
#include <limits>
#include "saf_math.h"
//// Some more information for adding more functionality here:
dtipson / IO plus Array & Promise helpers.js
Last active Oct 1, 2019
Bare bones FP type utility lib so we can play around with functions that capture the composition of DOM read/writes, but in a pure way
View IO plus Array & Promise helpers.js
// Let's make it possible to create pure functions even when we're
// dealing with impure operations that would have side effects!
// First we'll need a "Type" that can contain a (sometimes impure) function
function IO(fn) {
if (!(this instanceof IO)) {//make it simpler for end users to create a type without "new"
return new IO(fn);
this.runIO = fn;//IO now provides an extra control layer that allows the composition of unexecuted effects
You can’t perform that action at this time.