{"id":20122396,"url":"https://github.com/noyzys/fp-practice","last_synced_at":"2025-03-02T20:24:13.429Z","repository":{"id":225357611,"uuid":"765775799","full_name":"noyzys/fp-practice","owner":"noyzys","description":"* Basic functional programming concepts","archived":false,"fork":false,"pushed_at":"2024-03-01T15:58:30.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-13T07:30:49.623Z","etag":null,"topics":["concepts","fp","functional-components","functional-programming","functor","monad"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/noyzys.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-01T15:39:54.000Z","updated_at":"2024-11-13T20:46:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"7f639f1c-5edc-498e-ad91-822a18ed8aad","html_url":"https://github.com/noyzys/fp-practice","commit_stats":null,"previous_names":["noyzys/fp-practice"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noyzys%2Ffp-practice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noyzys%2Ffp-practice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noyzys%2Ffp-practice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noyzys%2Ffp-practice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noyzys","download_url":"https://codeload.github.com/noyzys/fp-practice/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241565864,"owners_count":19983207,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["concepts","fp","functional-components","functional-programming","functor","monad"],"created_at":"2024-11-13T19:37:22.991Z","updated_at":"2025-03-02T20:24:13.386Z","avatar_url":"https://github.com/noyzys.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FP CONCEPTS \n\n# 1. FUNCTOR:\n* A Functor is a datatype that preserves structure and implements the map function.\n* Preserving structure simply means that you can put a value inside and the structure itself won’t change it.\n* Map (or mapper/fmap) is a function that takes a function as an argument and applies that function to the values in the structure it operates on.\n\n# 2. MONAD:\n* A monad is a structure that combines program fragments (functions), and wraps their return values in a type with additional computation.\n* Example from java java.util.Optional - Monad\n\n# 3. MONOIDS:\n* A Monoid is a design pattern expressing function composition of items in a set, \nis a function that takes two arguments and returns an argument of that type and it supports both the identity property.\n\n**Pure functions ;]**\n# IN KOTLIN:\n* A higher-order function is a function that takes one or more functions as arguments or returns a function as a result. \n* In Kotlin, We can define higher-order functions using lambda expressions. `( (A, B) -\u003e C )`.\n* Example from kotlin functor `fold`.\n* A pure function doesn't depend on anything other than its input parameters.\n\n# USE JAVA SLANG/VAVR:\n* [vavr.official](https://www.vavr.io/)\n* [vavr.git](https://github.com/vavr-io/vavr)\n* [vavr.kotlin](https://github.com/vavr-io/vavr-kotlin)\n* **PURE FUN**\n\n# 4. SCALA\n[scala.lg](https://github.com/scala)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoyzys%2Ffp-practice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoyzys%2Ffp-practice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoyzys%2Ffp-practice/lists"}