Skip to content

Instantly share code, notes, and snippets.

import * as E from 'fp-ts/Either'
import { pipe } from 'fp-ts/function'
import * as t from 'io-ts'
import { failure } from 'io-ts/PathReporter'
import { toRequestHandler } from 'hyper-ts/lib/express'
import express from 'express'
import * as H from 'hyper-ts'
import * as M from 'hyper-ts/lib/Middleware'
import pgPromise from 'pg-promise'
import * as TE from 'fp-ts/TaskEither'
grammar todo;
elements
: (element|emptyLine)* EOF
;
element
: '*' ( ' ' | '\t' )* CONTENT NL+
;
// works
(http-client/post
"https://api.mixpanel.com/import#past-events"
{:debug true :debug-body true
:basic-auth [mixpanel-api-secret]
:headers {"Accept" "text/plain"
"Content-Type" "application/x-www-form-urlencoded"}
:form-params {:verbose 1
:data json-event-str}
:as :json})
@tecklund
tecklund / index.ts
Created February 19, 2021 05:19
first crack at lodash to fp-ts conversion
import * as A from 'fp-ts/Array'
import * as Ap from 'fp-ts/Apply'
import * as A1 from 'fp-ts-std/Array'
import * as ROA from 'fp-ts/ReadonlyArray'
import * as NEA from 'fp-ts/NonEmptyArray'
import * as O from 'fp-ts/Option'
import * as Eq from 'fp-ts/Eq'
import * as Ord from 'fp-ts/Ord'
import * as R from 'fp-ts/Record'
import * as _ from 'lodash'