Repository
Current version released
4 years ago
Versions
- v0.0.52Latest
- v0.0.51
- v0.0.50
- v0.0.49
- v0.0.48
- v0.0.47
- v0.0.46
- v0.0.45
- v0.0.44
- v0.0.43
- v0.0.42
- v0.0.41
- v0.0.39
- v0.0.38
- v0.0.37
- v0.0.36
- v0.0.35
- v0.0.34
- v0.0.33
- v0.0.32
- v0.0.31
- v0.0.30
- v0.0.29
- v0.0.28
- v0.0.27
- v0.0.26
- v0.0.25
- v0.0.24
- v0.0.23
- v0.0.22
- v0.0.21
- v0.0.20
- v0.0.19
- v0.0.18
- v0.0.17
- v0.0.16
- v0.0.15
- v0.0.14
- v0.0.13
- v0.0.12
- v0.0.11
- v0.0.10
- v0.0.9
- v0.0.8
- v0.0.7
- v0.0.6
- v0.0.5
- v0.0.4
- v0.0.3
- v0.0.2
- v0.0.1
hkts
Higher kinded types for Deno. As an avid user of fp-ts I wanted to have a similarly full featured envvironment in Deno. Unfortunately, the fp-ts port to Deno is clunky to use with other functional libraries like @nll/datum, io-ts, and monocle-ts. While I could have ported fp-ts directly, I’ve come to like the exploratory work done by pelotom in the original hkts. Thus, I’ve decided to port the functionality of fp-ts, io-ts, and monocle-ts to Deno using the HKT substitution developed by pelotom.
Installation
This library is meant to be used with Deno, thus it follows the Deno imports syntax.
import * as O from "https://deno.land/x/hkts/option.ts";
import { pipe } from "https://deno.land/x/hkts/pipe.ts";
const result = pipe(
O.some(1),
O.map(n => n + 1),
O.chain(n => n % 2 === 0 ? O.none, O.some(n))
);
// result = O.none.