PolymerLabs / arcs

Arcs
BSD 3-Clause "New" or "Revised" License
58 stars 35 forks source link

"Heat" up Arcs #3030

Open alxmrs opened 5 years ago

alxmrs commented 5 years ago

In #2984 , a higher-order-types (hot.ts) file was introduced. Subsequently (in #3012, #2998, etc.), additional types were added.

Let's update the codebase to express functions and data types as applications of higher order types instead of "hard-coded" ones.

Let's heat up Arcs!

lindner commented 5 years ago

Any interest in something like this:

export type Predicate<T> = (input: T) => boolean;
export namespace Predicate {
  export const alwaysTrue = <T>() => true;
  export const alwaysFalse = <T>() => false;
  // TODO and(..) negate(..) or(..) etc..
}
lindner commented 5 years ago

Looking into starting a Guava for Typescript. we'll see how that progresses..