{"id":17532866,"url":"https://github.com/dragisak/monocle-cats","last_synced_at":"2025-08-22T23:21:59.568Z","repository":{"id":35780035,"uuid":"40060000","full_name":"dragisak/monocle-cats","owner":"dragisak","description":"Monocle Lenses and Cats State","archived":false,"fork":false,"pushed_at":"2019-09-12T21:42:33.000Z","size":40,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-23T19:51:06.805Z","etag":null,"topics":["cats","monocle","scala"],"latest_commit_sha":null,"homepage":null,"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/dragisak.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}},"created_at":"2015-08-01T21:05:47.000Z","updated_at":"2019-09-12T21:42:34.000Z","dependencies_parsed_at":"2022-08-17T21:31:05.475Z","dependency_job_id":null,"html_url":"https://github.com/dragisak/monocle-cats","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/dragisak/monocle-cats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragisak%2Fmonocle-cats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragisak%2Fmonocle-cats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragisak%2Fmonocle-cats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragisak%2Fmonocle-cats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dragisak","download_url":"https://codeload.github.com/dragisak/monocle-cats/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragisak%2Fmonocle-cats/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271716629,"owners_count":24808588,"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-08-22T02:00:08.480Z","response_time":65,"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":["cats","monocle","scala"],"created_at":"2024-10-20T18:06:14.340Z","updated_at":"2025-08-22T23:21:59.510Z","avatar_url":"https://github.com/dragisak.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Monocle Lenses and Cats State\n\n[![Build Status](https://travis-ci.org/dragisak/monocle-cats.svg)](https://travis-ci.org/dragisak/monocle-cats) \n[![Coverage Status](https://coveralls.io/repos/dragisak/monocle-cats/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/dragisak/monocle-cats?branch=master)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.dragishak/monocle-cats_2.13/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.dragishak/monocle-cats_2.13) \n\nThis library brings together [Monocle Lenses](http://julien-truffaut.github.io/Monocle/)  and [Cats](https://typelevel.org/cats/) project.\n\n## Use\n\n```scala\nlibraryDependencies += \"com.dragishak\" %% \"monocle-cats\" % \"\u003cversion\u003e\"\n```\n\n## Version support matrix\n\nMonocle   | Cats      | Scala            | monocle-cats \n----------|-----------|------------------|-----------------\n1.2.2     | 0.7.2     | 2.10, 2.11       | 1.0\n1.3.2     | 0.8.1     | 2.10, 2.11, 2.12 | 1.1    \n1.4.0     | 0.9.0     | 2.10, 2.11, 2.12 | 1.2  \n2.0.0     | 2.0.0     | 2.12, 2.13       | 1.3\n\n## Example\n\n```scala\nimport cats.monocle.syntax._\nimport cats.instances.all._\nimport monocle.macros.Lenses\n\n@Lenses case class Address(street: String, city: String, zip: Int)\n@Lenses case class Person(name: String, age:Int, address: Address)\n\nval setStreet = Address.street := \"13 Main St.\"\nval incrementAge = Person.age += 1\n\nval state = for {\n  newStreetName \u003c- Person.address %%= setStreet\n  newAge        \u003c- incrementAge\n} yield (newStreetName, newAge)\n\nval person = Person(\"Alice\", 30, Address(\"1 Main St\", \"San Francisco\", 94123))\n\nval (changedPerson, (newStreet, newAge)) = state.run(person).value\n\n```\n\n## Copyright and License\n\nAll code is available to you under the MIT license, available at [http://opensource.org/licenses/MIT](http://opensource.org/licenses/MIT) and also\nin the LICENSE file.\n\nCopyright Dragisa Krsmanovic, 2019.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdragisak%2Fmonocle-cats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdragisak%2Fmonocle-cats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdragisak%2Fmonocle-cats/lists"}