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

https://github.com/47degrees/fp-fundamentals


https://github.com/47degrees/fp-fundamentals

Last synced: over 1 year ago
JSON representation

Awesome Lists containing this project

README

          

# FP Fundamentals

As part of the some FP mentoring sesions we have developed a very simple project (in Scala, Kotlin and Swift) that basically shows how to express the behavior of your program using type classes: `Combinator`, `Transformer`, `Lifter` and `Flattener`, which are basically a simpler version of `Semigroup`, `Functor`, `Applicative` and `Monad`.

## [Scala3](/scala)

- [Step 0: Foundations](https://github.com/47degrees/fp-fundamentals/pull/5/commits/f468ade5bfecaf04460f71f0e6acdef9ca9aae96)
- [Step 1: Create data type Maybe](https://github.com/47degrees/fp-fundamentals/pull/5/commits/e5fdb6526e0d69100a04313ea3fc14a1d471b26a)
- [Step 2: Create type class Combinator](https://github.com/47degrees/fp-fundamentals/pull/5/commits/30cd74b3027d7caa75de74eef779c63fd9462204)
- [Step 3: Add syntax for Combinator](https://github.com/47degrees/fp-fundamentals/pull/5/commits/627df5dbf8a7d70abb36baf2ebd488ec2a86e1bb)
- [Step 4: Create type class Transformer (with syntax)](https://github.com/47degrees/fp-fundamentals/pull/5/commits/98ade72620f2c594fae15adb5c7eabb4e4f7e548)
- [Step 5: Create type class Transformer2](https://github.com/47degrees/fp-fundamentals/pull/5/commits/e372f849f821871192e88fc5d040d768e195aa0a)
- [Step 6: Create type class Lifter](https://github.com/47degrees/fp-fundamentals/pull/5/commits/76fa52de035dd09ae663a76f31c3e3c86c619553)
- [Step 7: Create type class Flattener](https://github.com/47degrees/fp-fundamentals/pull/5/commits/e061506c9489e91f32339de14b1ca325ae41a68d)
- [Step 8: Use monadic structure](https://github.com/47degrees/fp-fundamentals/pull/5/commits/49f53dd4eff5202b881c9427a061455e12224b85)
- [Step 9: Use Option](https://github.com/47degrees/fp-fundamentals/pull/5/commits/8f708653e5946c153712337c15bbd3166f6cc6ac)
- [Step 10: Generic F-program](https://github.com/47degrees/fp-fundamentals/pull/5/commits/ac1856cb20f2b0a94e70e58cfece726d4556f712)

## [Scala](/scala)

- [Step 0: Foundations](https://github.com/47degrees/fp-fundamentals/commit/a1eb8385ba2de21ef36b7a9449f3630d5edae321)
- [Step 1: Create data type Maybe](https://github.com/47degrees/fp-fundamentals/commit/9dc4a6136935ca15c95918f22d4fcac2dbe60f72)
- [Step 2: Create type class Combinator](https://github.com/47degrees/fp-fundamentals/commit/b81c78d415cc6a77a16f147bc63e79f3c7c23d0c)
- [Step 3: Add syntax for Combinator](https://github.com/47degrees/fp-fundamentals/commit/197631105a3cc7835ccef9ee08810f6a33fcf4e6)
- [Step 4: Create type class Transformer (with syntax)](https://github.com/47degrees/fp-fundamentals/commit/d01460ac58347db8a36b53b2586b5a53207fb224)
- [Step 5: Create type class Transformer2](https://github.com/47degrees/fp-fundamentals/commit/61a04fb37a3e240a67f24ee3e8acbb27bc6640a4)
- [Step 6: Create type class Lifter](https://github.com/47degrees/fp-fundamentals/commit/dbd48796eefde4cc34608e4bb75352d5886b8f25)
- [Step 7: Create type class Flattener](https://github.com/47degrees/fp-fundamentals/commit/669762afd543acec6644d33ce5d21af683d3ccf9)
- [Step 8: Use monadic structure](https://github.com/47degrees/fp-fundamentals/commit/f28342d8e7d0f5df133597ade9304c56e5f9ea82)
- [Step 9: Use Option](https://github.com/47degrees/fp-fundamentals/commit/df0ede5c5c2b1d3a438247636e9c8008275d81fd)
- [Step 10: Generic F-program](https://github.com/47degrees/fp-fundamentals/commit/bf542adf83f6443743569ece324be4f3054a0135)

## [Kotlin](/kotlin)

- [Step 0: Foundations](https://github.com/47degrees/fp-fundamentals/commit/2e488604568e615dab1eb2eabdd8f9905f104c1c)
- [Step 1a: Create data type Maybe](https://github.com/47degrees/fp-fundamentals/commit/1c5aaf6557876e65d8875bdce0c4dc748d1bf29c)
- [Step 1b: add HKT support to Maybe\](https://github.com/47degrees/fp-fundamentals/commit/bde34ca574b155b8842d9cce75adb7ca6d7d6c29)
- [Step 2: Create typeclass Combinator](https://github.com/47degrees/fp-fundamentals/commit/0cd4cfc7af5c5252af149e3c3ddafbbe52072c68)
- [Step 3: Create Transformer type class](https://github.com/47degrees/fp-fundamentals/commit/ce8a7bdd27d42dd6a6ca0994d07e0a5c521b30cf)
- [Step 4: Create Transformer2 type class](https://github.com/47degrees/fp-fundamentals/commit/d830be70709ba2778b8f65276dd1979b9ee95b50)
- [Step 5: Create typeclass Lifter](https://github.com/47degrees/fp-fundamentals/commit/80f4aecf301bde8f07665ca2008def7f73286f8c)
- [Step 6: Create typeclass Flattener](https://github.com/47degrees/fp-fundamentals/commit/b4e4c368ac98b6d8e1de68e0035bba93a620bf84)
- [Step 7: Use Option](https://github.com/47degrees/fp-fundamentals/commit/fc3922966c1b2a15d70fbba7ce7edad91d3bca4e)
- [Step 8: Generic F-program](https://github.com/47degrees/fp-fundamentals/commit/53d0b064d6118249540b9dc68f70f1caa0f34678)

# [Swift](/swift)

- [Step 0: Foundations](https://github.com/47degrees/fp-fundamentals/commit/b2f6787b51f40461fd3ca7ee9db2fa70c2624d7a)
- [Step 1a: Create data type Maybe](https://github.com/47degrees/fp-fundamentals/commit/79ae9a2fcb1dfbd07aa20633bd2ae01581ff2984)
- [Step 1b: Create data type Maybe with HKT support](https://github.com/47degrees/fp-fundamentals/commit/993bf5c08bd7a1ac7ccd632228525c59eb31883b)
- [Step 2: Create type class Combinator](https://github.com/47degrees/fp-fundamentals/commit/1a86433c7a413bb76ace893beef1d0de71b16435)
- [Step 4: Create type class Transformer](https://github.com/47degrees/fp-fundamentals/commit/9a9f9d0813a7e6361bbfc0b1d0d07b5f6e6be6fd)
- [Step 5: Create type class Transformer2](https://github.com/47degrees/fp-fundamentals/commit/f554259573ea585547ace2c1eb1a4986f8a8e3ce)
- [Step 6: Create type class Lifter](https://github.com/47degrees/fp-fundamentals/commit/ed48df9b0ef87cd31454ac5c720a4f03e92a9d9d)
- [Step 7: Create type class Flattener](https://github.com/47degrees/fp-fundamentals/commit/a6b545a4400f4c9ee4a86d3054fbf71a969504da)
- [Step 9: Use Option](https://github.com/47degrees/fp-fundamentals/commit/aebcf7d8c39f22757199d1e5055cef766418c289)
- [Step 10: Generic F-program](https://github.com/47degrees/fp-fundamentals/commit/b0d6d8908ff1cba87ef05e5a149c32d4518c5434)