Skip to content

Instantly share code, notes, and snippets.

View CarlosLanderas's full-sized avatar

Carlos Landeras CarlosLanderas

View GitHub Profile
@CarlosLanderas
CarlosLanderas / condition_evaluator.ts
Last active September 21, 2016 06:09
Functional typescript
export function and<T>(conditions : Array<(T) => boolean>) : (obj:T) => boolean {
return (e: T) => conditions.every( c=> c(e));
}