├── .eslintignore ├── .eslintrc ├── .gitignore ├── .husky └── pre-commit ├── .prettierignore ├── .prettierrc ├── .yaspellerrc ├── LICENSE ├── README.md ├── either ├── LICENSE ├── README.md ├── index.ts └── package.json ├── identity ├── LICENSE ├── README.md ├── index.ts └── package.json ├── interfaces ├── LICENSE ├── README.md ├── alternative.ts ├── applicative.ts ├── async-applicative.ts ├── async-chainable.d.ts ├── async-functor.d.ts ├── async-monad.d.ts ├── catamorphism.ts ├── class-implements.d.ts ├── container.d.ts ├── functor.d.ts ├── index.d.ts ├── monad.d.ts └── package.json ├── iterator ├── LICENSE ├── README.md ├── filter-operation.ts ├── index.ts ├── intermediate-operation.ts ├── map-operation.ts └── package.json ├── jest.config.js ├── logo.svg ├── maybe ├── LICENSE ├── README.md ├── index.ts └── package.json ├── package-lock.json ├── package.json ├── tests ├── either.test.ts ├── identity.test.ts ├── iterator.test.ts └── maybe.test.ts ├── tsconfig.json └── yarn.lock /.eslintignore: -------------------------------------------------------------------------------- 1 | # don't ever lint node_modules 2 | node_modules 3 | **/build/** -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "parser": "@typescript-eslint/parser", 4 | "plugins": ["@typescript-eslint"], 5 | "extends": [ 6 | "eslint:recommended", 7 | "plugin:@typescript-eslint/eslint-recommended", 8 | "plugin:@typescript-eslint/recommended" 9 | ], 10 | "rules": { 11 | "@typescript-eslint/no-explicit-any": "off", 12 | "@typescript-eslint/explicit-module-boundary-types": "off" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | *.log 3 | .DS_Store 4 | 5 | build 6 | node_modules 7 | npm-debug.log 8 | 9 | **/tsconfig.json 10 | 11 | .idea/ -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | yarn test 5 | yarn lint-staged 6 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | # Add files here to ignore them from prettier formatting 2 | tmp/ 3 | out-tsc/ 4 | node_modules/ 5 | .vscode/ 6 | .idea/ 7 | .vscode/ 8 | .prettierignore 9 | package-lock.json 10 | package.json 11 | yarn.lock 12 | **/build/** 13 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "bracketSpacing": true, 3 | "printWidth": 120, 4 | "semi": true, 5 | "singleQuote": false, 6 | "tabWidth": 2, 7 | "useTabs": false, 8 | "trailingComma": "none", 9 | "arrowParens": "avoid" 10 | } 11 | -------------------------------------------------------------------------------- /.yaspellerrc: -------------------------------------------------------------------------------- 1 | { 2 | "lang": "en", 3 | "ignoreCapitalization": true, 4 | "dictionary": [ 5 | "js", 6 | "JS", 7 | "Artem", 8 | "Kobzar", 9 | "iterable", 10 | "npm", 11 | "AsyncApplicative", 12 | "AsyncChainable", 13 | "AsyncFunctor", 14 | "AsyncFunctors", 15 | "auditable", 16 | "AsyncMonad", 17 | "Async", 18 | "async", 19 | "fmap", 20 | "haskell", 21 | "wikibooks", 22 | "asynchronously", 23 | "morphisms", 24 | "MonadPlus", 25 | "monoidal", 26 | "Homomorphism", 27 | "composable", 28 | "updatable", 29 | "undefinable", 30 | "iterables" 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019-2022 Artem Kobzar 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # @sweet-monads 2 | 3 |
4 |
5 |
6 |
7 |