Javascript Allonge
Producing undefined
// can sometimes cause problems if undefined is defined
log( undefined )
undefined
// void anything is undefined
log( void 0 )
undefined
// a function that doesn't return a value returns undefined
log( ( () => {} )() )
undefined
function.length is the arity
log( (() => {}).length )
0
log( ((x) => {}).length )
1
log( ((x,y) => {}).length )
2
let tap = ( x ) => ( y ) => y( x )
log( tap( 1 )( x => x + 1 ) )