{"id":19485657,"url":"https://github.com/pyozer/fp-exercises","last_synced_at":"2026-06-07T21:31:41.275Z","repository":{"id":66215386,"uuid":"289928064","full_name":"Pyozer/fp-exercises","owner":"Pyozer","description":"🐢 Let's talk about functional programming","archived":false,"fork":false,"pushed_at":"2020-08-31T10:14:46.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-21T01:10:13.563Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":false,"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/Pyozer.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":"2020-08-24T12:56:08.000Z","updated_at":"2020-08-31T10:14:48.000Z","dependencies_parsed_at":"2023-02-25T02:15:19.043Z","dependency_job_id":null,"html_url":"https://github.com/Pyozer/fp-exercises","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Pyozer/fp-exercises","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pyozer%2Ffp-exercises","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pyozer%2Ffp-exercises/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pyozer%2Ffp-exercises/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pyozer%2Ffp-exercises/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pyozer","download_url":"https://codeload.github.com/Pyozer/fp-exercises/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pyozer%2Ffp-exercises/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285138471,"owners_count":27121052,"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","status":"online","status_checked_at":"2025-11-18T02:00:05.759Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-10T20:29:20.546Z","updated_at":"2025-11-18T21:02:28.903Z","avatar_url":"https://github.com/Pyozer.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Hello, FP\n\n## \u003ca name='TOC'\u003e🐼 Summary\u003c/a\u003e\n\n- [Rules](#rules)\n- [Overview](#overview)\n- [Exercises](#exercises)\n- [Credits](#credits)\n\n## \u003ca name='overview'\u003e🦊 Rules\u003c/a\u003e\n\nHi, here are some rules to carry out this story oav;\n\n- You **MUST** create a git repository named `fp-exercises`\n- You **MUST** create a file called `.author` with your firstname and lastname followed by a newline.\n\n```sh\n~/fp-exercises ❯❯❯ cat -e .author\nMajdi Toumi$\n```\n\n\u003e Of course, you can talk about the subject with other developers, peer-learning is\n\u003e the key to be a better developer. Don't hesitate to ask questions or help people on slack.\n\n\u003e Don't forget, there is no useless question :-)\n\n- You **MUST** return the project before Tuesday August, 31 at 4:00 pm by sending an MP on slack with the link of your github repo.\n- You **MUST** add `pu-erh` user as a collaborator.\n- YOU **MUST** define all functions signature by yourself :)\n- YOU **MUST** use functional programming concepts\n\n\u003e You can learn more about FP [here](https://mostly-adequate.gitbooks.io/mostly-adequate-guide/content/)\n\n## \u003ca name='overview'\u003e🐱 Overview\u003c/a\u003e\n\nThe purpose of theses exercises is simple, learn basic to functional programming.\nYou **CAN'T** use any libraries.\n\n## \u003ca name='exercises'\u003e🐨 Exercises\u003c/a\u003e\n\n### 01 Deep Array\n\nFilename : **`deepArrayInfos.ts`**\n\nWrite a functions that :\n\n- calculate the sum of a deep array\n- calculate the depth of the array\n- find the largest value in a tree\n- find the smallest value in a tree\n\nExample of an array : `[1, [[2], 3], [4], 5, [6, 42, [[86], [[12]], 1337]], 1]`\n\n### 02 Creating array\n\nFilename : **`create.ts`**\n\nCreate a function `create` that takes an arbitrary number of arguments and creates an array of the arguments given.\n\n### 03 Adding into Array\n\nFilename : **`add.ts`**\n\nCreate a function `add` that takes an arbitrary number of arguments, and adds them all to an array.\n\n### 04 Removing into Array\n\nFilename : **`sub.ts`**\n\nCreate a function `sub` that subtracts all the arguments but the first from the first\n\n### 05 Compose\n\nFilename : **`compose.ts`**\n\nCreate a function `compose` that takes 2 functions and does function composition\n\n\u003e compose(g, f) should return a function that first calls f and then g on its argument.\n\n### 06 Compose Nary\n\nFilename : **`composeN.ts`**\n\nCreate a `compose` function that can take N arguments, and that returns a function that can take N arguments.\n\n### 07 Partial\n\nFilename : **`partial.ts`**\n\nCreate a function `partial` that takes a function Fn and N arguments, and returns a new function that is Fn partially applied to the arguments.\n\n### 08 Memoize\n\nFilename : **`memoize.ts`**\n\nCreate a function `memoize` take takes a function and memoizes it, i.e. it returns a function that does the same thing that the given function, but caches its results in a map.\n\n### 09 GroupBy\n\nFilename : **`groupBY.ts`**\n\nCreate a function `groupBy` that takes a function Fn and an array and groups the elements of the sequence based on the result of Fn.\n\n### 10 Map\n\nFilename : **`map.ts`**\n\nCreate a function `map` that reproduce the well-used **map** function :)\n\n### 11 Filter\n\nFilename : **`filter.ts`**\n\nCreate a function `filter` that reproduce the well-used **filter** function :)\n\n### 12 Reduce\n\nFilename : **`reduce.ts`**\n\nCreate a function `reduce` that reproduce the well-used **reduce** function :)\n\n## \u003ca name='credits'\u003e🐵 Credits\u003c/a\u003e\n\nCraft with :heart: in **Paris**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyozer%2Ffp-exercises","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyozer%2Ffp-exercises","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyozer%2Ffp-exercises/lists"}