Skip to content

Instantly share code, notes, and snippets.

View mintyPT's full-sized avatar
🦑

MG Santos mintyPT

🦑
View GitHub Profile
@mintyPT
mintyPT / composition.js
Last active January 17, 2017 14:56
Compose functions into a new one
// http://scott.sauyet.com/Javascript/Talk/Compose/2013-05-22/#slide-17
var compose = function() {
var funcs = arguments;
return function() {
var args = arguments;
for (var i = funcs.length; i --> 0;) {
args = [funcs[i].apply(this, args)];
}
return args[0];
};
@mintyPT
mintyPT / index.html
Last active February 19, 2016 09:20
Some kind of cleaning function, no ideia why I made this though
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
#input, #output {
width: 500px;