All Projects → nullpub → hkts

nullpub / hkts

Licence: MIT License
Functional programming tools: option, either, task, state, optics, etc.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to hkts

apropos
Fast strong typed 'Either' data structure for typescript and flow
Stars: ✭ 20 (+0%)
Mutual labels:  functional, fp, monad
fnts
λ Minimal Functional Programming Utilities for TypeScript & JavaScript
Stars: ✭ 75 (+275%)
Mutual labels:  functional, fp, monad
Kotlin Result
A multiplatform Result monad for modelling success or failure operations.
Stars: ✭ 369 (+1745%)
Mutual labels:  functional, fp, monad
Morphism
⚡ Type-safe data transformer for JavaScript, TypeScript & Node.js.
Stars: ✭ 336 (+1580%)
Mutual labels:  functional, fp
Swiftz-Validation
A data structure for validations. It implements the applicative functor interface
Stars: ✭ 15 (-25%)
Mutual labels:  functional, fp
Eslint Plugin Functional
ESLint rules to disable mutation and promote fp in JavaScript and TypeScript.
Stars: ✭ 282 (+1310%)
Mutual labels:  functional, fp
Monio
Async-capable IO monad for JS
Stars: ✭ 311 (+1455%)
Mutual labels:  fp, monad
Sup
Composable, purely functional healthchecks in Scala.
Stars: ✭ 138 (+590%)
Mutual labels:  functional, fp
Fkit
A functional programming toolkit for JavaScript.
Stars: ✭ 588 (+2840%)
Mutual labels:  functional, fp
Design-Patterns
Project for learning and discuss about design patterns
Stars: ✭ 16 (-20%)
Mutual labels:  fp, monad
function-composition-cheatsheet
Composition of Functions
Stars: ✭ 24 (+20%)
Mutual labels:  fp, monad
pyroclastic
Functional dataflow through composable computations
Stars: ✭ 17 (-15%)
Mutual labels:  functional, fp
Bow
🏹 Bow is a cross-platform library for Typed Functional Programming in Swift
Stars: ✭ 538 (+2590%)
Mutual labels:  fp, monad
Fun Task
Abstraction for managing asynchronous code in JS
Stars: ✭ 363 (+1715%)
Mutual labels:  fp, monad
php-slang
The place where PHP meets Functional Programming
Stars: ✭ 107 (+435%)
Mutual labels:  fp, monad
Alembic
⚗️ Functional JSON Parser - Linux Ready 🐧
Stars: ✭ 115 (+475%)
Mutual labels:  functional, monad
functional-structures-refactoring-kata
Starting code and proposed solution for Functional Structures Refactoring Kata
Stars: ✭ 31 (+55%)
Mutual labels:  functional, monad
fpEs
Functional Programming for EcmaScript(Javascript)
Stars: ✭ 40 (+100%)
Mutual labels:  fp, monad
ts-belt
🔧 Fast, modern, and practical utility library for FP in TypeScript.
Stars: ✭ 439 (+2095%)
Mutual labels:  fp, monad
potassium
A framework for writing robot software with functional programming in Scala
Stars: ✭ 16 (-20%)
Mutual labels:  functional

DEPRECATED

This repository has been replaced by functional!

It will be kept alive as a historical reference and as a deno target in the event that someone is relying on its existence.

hkts Deno

Higher kinded types for Deno. As an avid user of fp-ts I wanted to have a similarly full featured environment 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.

This library is primarily an exercise, but I intend to maintain 100% test coverage. Instead of breaking out the clones of io-ts, monocle-ts, and datum into other Deno modules they will all be landed here. There will be no barrel exports as importing in Deno is much cleaner without them. Contributions are welcome.

Installation

This library is meant to be used with Deno, thus it follows the Deno imports syntax.

Conventions

This library focuses first on implementing static-land type classes for a given Algebraic Data Type (ie. Either or Option). These type class modules are then exported from the ADT's namespace (eg. import { Monad } from 'https://deno.land/x/hkts/option.ts').

With the exception of instance constructors (ie. getShow or getSemigroup) other ADT functions should all be pipeable. For functions that derive from type class modules, like chain or map, there are helpers in derivations.ts that will generate the pipeable versions for you.

For good examples of the above conventions look at the either.ts or option.ts.

Documentation

For the foreseeable future this library will not focus on documentation. Questions are welcome via github issues but I can't guaruntee speedy responses. Once a decent collection of ADTs and other utilities are ported and all the pre-1.0.0 todo items in TODO.md are complete I'll shift to documentation. Even then it's likely that I'll auto-generate the raw docs from exported function and statement types and will devote any time to building an example library that doubles as extra tests.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].