This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import type { Kind, URIS } from "./hkt.ts"; | |
| import type * as TC from "./type_classes.ts"; | |
| import { flow, pipe } from "./fns.ts"; | |
| export type FunctorComposition<URI extends URIS, VRI extends URIS> = { | |
| readonly map: <A, I>( | |
| fai: (a: A) => I, | |
| ) => <B, C, D, E, F, G>( | |
| ta: Kind<URI, [Kind<VRI, [A, B, C, D]>, E, F, G]>, | |
| ) => Kind<URI, [Kind<VRI, [I, B, C, D]>, E, F, G]>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /******************************************************************************* | |
| * Kinds Type | |
| * @description A registry for Kind URIS with their substitution strategies. | |
| * Note that the idiomatic replacement type for kinds uses _0 as the inner- | |
| * most hole for Functor and Chain. Thus Either<L, R> should use the hole | |
| * order of Either<_1, _0>. This is reflected in the replacement strategies | |
| * used in type_classes.ts | |
| ******************************************************************************/ | |
| export interface Kinds<A, B, C, D> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /******************************************************************************* | |
| * Kinds Type | |
| * | |
| * A registry for Kind URIS with their substitution strategies. | |
| * Note that the idiomatic replacement type for kinds uses $[0] as the inner- | |
| * most hole for Functor and Chain. Thus Either<L, R> should use the hole | |
| * order of Either<$[1], $[0]>. | |
| * | |
| * Here $ is a tuple of types that can be substituted into each kind. | |
| ******************************************************************************/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Option | |
| export type None = { tag: "None" }; | |
| export type Some<A> = { tag: "Some"; value: A }; | |
| export type Option<A> = None | Some<A>; | |
| // Either |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import type * as TC from "https://deno.land/x/hkts/type_classes.ts"; | |
| import type { _, Fn } from "https://deno.land/x/hkts/types.ts"; | |
| import { pipe } from "https://deno.land/x/hkts/fns.ts"; | |
| enum Signal { | |
| Open, | |
| Ready, | |
| Pause, | |
| Drain, | |
| Close, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| _________________________________________ | |
| / On the other hand, the TCP camp also \ | |
| | has a phrase for OSI people. There are | | |
| | lots of phrases. My favorite is | | |
| | `nitwit' -- and the rationale is the | | |
| | Internet philosophy has always been you | | |
| | have extremely bright, non-partisan | | |
| | researchers look at a topic, do | | |
| | world-class research, do several | | |
| | competing implementations, have a | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { serve } from "https://deno.land/std/http/server.ts"; | |
| import { connect } from "https://deno.land/x/[email protected]/mod.ts"; | |
| import { use } from "https://deno.land/x/[email protected]/deno_handler.ts"; | |
| import * as S from "https://deno.land/x/[email protected]/sedate.ts"; | |
| import { pipe } from "https://deno.land/x/[email protected]/fns.ts"; | |
| const nil = <A>(a: A): a is NonNullable<A> => a === undefined && a === null; | |
| const PORT = Deno.env.get("PORT"); | |
| const REDIS_URL = Deno.env.get("REDIS_URL"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @since 0.0.0 | |
| */ | |
| /** | |
| * @since 0.0.0 | |
| */ | |
| export interface SpringConfig { | |
| mass: number; | |
| tension: number; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export * from "https://cdn.pika.dev/fp-ts@^2.6.1"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as C from "io-ts/es6/Codec"; | |
| import * as E from "fp-ts/es6/Either"; | |
| import { draw } from "io-ts/es6/Tree"; | |
| import { pipe } from "fp-ts/es6/pipeable"; | |
| import { actionCreatorFactory, AsyncActionCreators } from "@nll/dux/Actions"; | |
| import { asyncConcatMap } from "@nll/dux/Operators"; | |
| import { RunOnce, filterEvery, RunEvery, Store } from "@nll/dux/Store"; | |
| import { of, Observable, throwError, interval } from "rxjs"; | |
| import { mergeMap, map } from "rxjs/operators"; |