Skip to content

Instantly share code, notes, and snippets.

View jaredwy's full-sized avatar

Jared Wyles jaredwy

View GitHub Profile
@jaredwy
jaredwy / gist:5606014
Created May 18, 2013 22:51
Maybe code.
function Maybe(x) {
this.x = x;
this.isEmpty = x == null || x == undefined;
}
Maybe.prototype.map = function(f) {
//composition operator anyone?
return this.chain(function(x) {
return Maybe.of(f(x));
Honest Signals
Alex (Sandy) Pentland
Essentials of Programming Languages, third edition
Daniel P. Friedman and Mitchell Wand
Explaining the Computational Mind
Marcin Milkowski
pipeline {
agent label:'master'
stages {
stage('build') {
execute 'echo step1'
execute 'echo step2'
execute '''
echo 'Multiline'
echo 'Example'
'''
namespace detail {
// Preconditions: T models ChannelConcept
template <typename T>
struct ChannelIsMutableConcept {
void constraints() {
c=c;
using std::swap;
swap(c,c);
}
T c;
const fs = require("fs");
const https = require("https");
const UNKNOWN = "UNKNOWN";
function getValue(obj) {
if(!obj) {
return UNKNOWN;
}
return obj.Value;