{"id":19016286,"url":"https://github.com/akhansari/stringcalculatorkata","last_synced_at":"2026-06-12T21:32:58.553Z","repository":{"id":227125899,"uuid":"486790373","full_name":"akhansari/StringCalculatorKata","owner":"akhansari","description":null,"archived":false,"fork":false,"pushed_at":"2022-05-04T16:57:21.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-21T17:48:33.042Z","etag":null,"topics":["fsharp","kata","pbt"],"latest_commit_sha":null,"homepage":"","language":"F#","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/akhansari.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}},"created_at":"2022-04-29T00:40:31.000Z","updated_at":"2022-05-01T19:06:23.000Z","dependencies_parsed_at":"2024-03-11T19:26:36.351Z","dependency_job_id":"c162896a-8cf0-40d2-9d8f-8d96ce2b8ad8","html_url":"https://github.com/akhansari/StringCalculatorKata","commit_stats":null,"previous_names":["akhansari/stringcalculatorkata"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/akhansari/StringCalculatorKata","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akhansari%2FStringCalculatorKata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akhansari%2FStringCalculatorKata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akhansari%2FStringCalculatorKata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akhansari%2FStringCalculatorKata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akhansari","download_url":"https://codeload.github.com/akhansari/StringCalculatorKata/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akhansari%2FStringCalculatorKata/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34263872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"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":["fsharp","kata","pbt"],"created_at":"2024-11-08T19:42:57.938Z","updated_at":"2026-06-12T21:32:58.523Z","avatar_url":"https://github.com/akhansari.png","language":"F#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# String Calculator Kata\n\nSource: https://kata-log.rocks/string-calculator-kata\n\nF# + Property based testing\n\n## Incremental kata\n\nIt’s an incremental kata to simulate a real business situation: start of by reading the section 1 and completing it, then go onto section 2, and when you have finished that, look at section 3, etc.\n\n### Step 1\n\nCreate a simple String calculator with a method signature:\n```\n    int Add(string numbers)\n```\nThe method can take up to two numbers, separated by commas, and will return their sum.\n\nFor example `\"\"` or `\"1\"` or `\"1,2\"` as inputs.\n\nFor an empty string it will return 0.\n\n### Step 2\n\nAllow the Add method to handle an unknown amount of numbers.\n\n### Step 3\nAllow the Add method to handle new lines between numbers (instead of commas):\n\nThe following input is ok: `\"1\\n2,3\"` (will equal 6)\n\nThe following input is NOT ok: `\"1,\\n\"` (not need to prove it - just clarifying)\n\n### Step 4\n\nSupport different delimiters:\n\nTo change a delimiter, the beginning of the string will contain a separate line that looks like this: `\"//[delimiter]\\n[numbers…]\"` for example `\"//;\\n1;2\"` should return three where the default delimiter is ‘;’.\n\nThe first line is optional. All existing scenarios should still be supported.\n\n### Step 5\n\nCalling Add with a negative number will throw an exception `\"negatives not allowed\"` - and the negative that was passed.\n\nIf there are multiple negatives, show all of them in the exception message.\n\n### Step 6\n\nNumbers bigger than 1000 should be ignored, so adding 2 + 1001 = 2\n\n### Step 7\n\nDelimiters can be of any length with the following format: `\"//[delimiter]\\n\"` for example: `\"//[***]\\n1***2***3\"` should return 6.\n\n### Step 8\n\nAllow multiple delimiters like this: `\"//[delim1][delim2]\\n\"` for example `\"//[*][%]\\n1*2%3\"` should return 6.\n\n### Step 9\n\nMake sure you can also handle multiple delimiters with length longer than one char.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakhansari%2Fstringcalculatorkata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakhansari%2Fstringcalculatorkata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakhansari%2Fstringcalculatorkata/lists"}