{"id":13632786,"url":"https://github.com/fpinscala/fpinscala","last_synced_at":"2025-05-12T13:20:47.000Z","repository":{"id":2548502,"uuid":"3526586","full_name":"fpinscala/fpinscala","owner":"fpinscala","description":"Code, exercises, answers, and hints to go along with the book \"Functional Programming in Scala\"","archived":false,"fork":false,"pushed_at":"2024-12-11T18:19:58.000Z","size":5754,"stargazers_count":5713,"open_issues_count":138,"forks_count":3038,"subscribers_count":312,"default_branch":"second-edition","last_synced_at":"2025-04-23T16:02:04.052Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://manning.com/bjarnason","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fpinscala.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2012-02-23T15:26:37.000Z","updated_at":"2025-04-23T14:54:50.000Z","dependencies_parsed_at":"2023-02-15T16:45:23.330Z","dependency_job_id":"e553dc92-e313-45f8-82cc-ee9a3d03bb5d","html_url":"https://github.com/fpinscala/fpinscala","commit_stats":{"total_commits":448,"total_committers":60,"mean_commits":7.466666666666667,"dds":0.6651785714285714,"last_synced_commit":"d8a72c0ca13049fd31410ff060b0d0d623e6e4a9"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpinscala%2Ffpinscala","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpinscala%2Ffpinscala/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpinscala%2Ffpinscala/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpinscala%2Ffpinscala/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fpinscala","download_url":"https://codeload.github.com/fpinscala/fpinscala/tar.gz/refs/heads/second-edition","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253745197,"owners_count":21957320,"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":[],"created_at":"2024-08-01T22:03:15.702Z","updated_at":"2025-05-12T13:20:46.977Z","avatar_url":"https://github.com/fpinscala.png","language":"Scala","funding_links":[],"categories":["Scala","Resources"],"sub_categories":["[Elm](http://elm-lang.org)"],"readme":"[![Join the chat at https://gitter.im/fpinscala/fpinscala](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/fpinscala/fpinscala?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge) \n\nThis repository contains exercises, hints, and answers for the book\n[Functional Programming in Scala](http://manning.com/bjarnason/). Along\nwith the book itself, it's the closest you'll get to having your own\nprivate functional programming tutor without actually having one.\n\nThere are two main branches in this repository:\n - [first-edition](https://github.com/fpinscala/fpinscala/tree/first-edition)\n - [second-edition](https://github.com/fpinscala/fpinscala/tree/second-edition)\n\nBe sure to select the branch which matches the edition of the book you are reading!\n\nHere's how to use this repository:\n\nEach chapter in the book develops a fully working library of functions\nand data types, built up through a series of exercises and example code\ngiven in the book text. The shell of this working library and exercise\nstubs live in\n`src/main/scala/fpinscala/exercises/\u003cchapter-description\u003e`, where\n`\u003cchapter-description\u003e` is a package name that corresponds to the\nchapter title (see below). When you begin working on a chapter, we\nrecommend you open the exercise file(s) for that chapter, and when you\nencounter exercises, implement them in the exercises file and make sure\nthey work.\n\nIf you get stuck on an exercise, let's say exercise 4 in the chapter,\nyou can find hints in `answerkey/\u003cchapter-description\u003e/04.hint.md` (if\nno hints are available for a problem, the file will just have a single\n'-' as its contents) and the answer along with an explanation of the\nanswer and any variations in\n`answerkey/\u003cchapter-description\u003e/04.answer.md`. The finished Scala\nmodules, with all answers for each chapter live in\n`src/main/scala/fpinscala/answers/\u003cchapter-description\u003e`. Please feel\nfree to submit pull requests for alternate answers, improved hints, and\nso on, so we can make this repo the very best resource for people\nworking through the book.\n\nChapter descriptions:\n\n* Chapter 2: gettingstarted\n* Chapter 3: datastructures\n* Chapter 4: errorhandling\n* Chapter 5: laziness\n* Chapter 6: state\n* Chapter 7: parallelism\n* Chapter 8: testing\n* Chapter 9: parsing\n* Chapter 10: monoids\n* Chapter 11: monads\n* Chapter 12: applicative\n* Chapter 13: iomonad\n* Chapter 14: localeffects\n* Chapter 15: streamingio\n\n### Setup build environment\n\nThe project is setup to use [Scala CLI](https://scala-cli.virtuslab.org). First install Scala CLI by following the [installation instructions](https://scala-cli.virtuslab.org/install).\n\nYou'll also likely want an editor that's aware of Scala syntax. [VSCode](https://code.visualstudio.com) with the [Metals](https://scalameta.org/metals/docs/editors/vscode.html) extension works great.\n\n### Building\n\nTo build the code for the first time, from the root directory of the project (i.e., the directory where this README.md is located):\n\n    $ scala-cli compile .\n\nThis compiles all exercises and answers. You can also do:\n\n    $ scala-cli console .\n\nto get a Scala REPL (prompt `scala\u003e`) with access to exercises and answers, and then for example:\n\n    scala\u003e import fpinscala.exercises.datastructures.List\n\nto import the `List` data type.\n\nTo run the sample programs:\n\n    $ scala-cli run .\n\nThis gives a list of possible main methods to execute. To run one of them:\n\n    $ scala-cli run . --main-class fpinscala.answers.gettingstarted.printAbs\n\nTo run a single unit-test, you can specify the fully qualified class name and test name:\n\n    $ scala-cli test . -- 'fpinscala.exercises.gettingstarted.GettingStartedSuite.MyProgram.factorial'\n\nTo run unit-tests for a package you can do:\n\n    $ scala-cli test . -- 'fpinscala.exercises.gettingstarted.*'\n\nTo run all unit-tests:\n\n    $ scala-cli test .\n\nNote, running all tests will result in failures. As you solve exercises, the tests\nwill start to pass.\n\n### SBT\n\nNote: an [SBT](https://www.scala-sbt.org) build is also provided.\n\n### License\n\nAll code in this repository is\n[MIT-licensed](http://opensource.org/licenses/mit-license.php). See the\nLICENSE file for details.\n\nHave fun, and good luck! Also be sure to check out [the community\nwiki](https://github.com/fpinscala/fpinscala/wiki) for the **chapter\nnotes**, links to more reading, and more.\n\n_Paul, Rúnar, and Michael_\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffpinscala%2Ffpinscala","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffpinscala%2Ffpinscala","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffpinscala%2Ffpinscala/lists"}