An open API service indexing awesome lists of open source software.

https://github.com/attack-monkey/fpipe

fsharp style pipe for typescript
https://github.com/attack-monkey/fpipe

Last synced: 2 months ago
JSON representation

fsharp style pipe for typescript

Awesome Lists containing this project

README

          

# fpipe
fsharp style pipe for typescript

An fsharp style pipe for typescript (default to arity 10)

## Install

```

npm i @attack-monkey/fpipe

```

## Usage

I like Ramda... but their `pipe` / `compose` is off for my liking.

Ramda `pipe` is essentially an fsharp `compose` and Ramda `compose` is just an fsharp right to left compose (`<<`).

`fpipe` is an fsharp pipe.

```typescript

const inc = (a: number) => a + 1

const thirteen = fpipe(10, inc, inc, inc)

```

^^ Which resembles

```fsharp

let thirteen = 10 |> inc |> inc |> inc

```