{"id":17485661,"url":"https://github.com/nickrobison/else-let","last_synced_at":"2025-03-28T14:40:39.008Z","repository":{"id":62432556,"uuid":"126653373","full_name":"nickrobison/else-let","owner":"nickrobison","description":"Clojure macro for conditional letting of variables","archived":false,"fork":false,"pushed_at":"2018-03-25T01:20:27.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-19T05:22:31.002Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nickrobison.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":"2018-03-25T01:04:15.000Z","updated_at":"2018-03-25T01:20:29.000Z","dependencies_parsed_at":"2022-11-01T20:46:54.012Z","dependency_job_id":null,"html_url":"https://github.com/nickrobison/else-let","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickrobison%2Felse-let","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickrobison%2Felse-let/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickrobison%2Felse-let/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickrobison%2Felse-let/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nickrobison","download_url":"https://codeload.github.com/nickrobison/else-let/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246049605,"owners_count":20715510,"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-10-19T02:08:24.959Z","updated_at":"2025-03-28T14:40:38.988Z","avatar_url":"https://github.com/nickrobison.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/nickrobison/else-let.svg?branch=master)](https://travis-ci.org/nickrobison/else-let)\n[![License](https://img.shields.io/badge/License-EPL%201.0-red.svg)](https://opensource.org/licenses/EPL-1.0)\n[![Clojars Project](https://img.shields.io/clojars/v/else-let.svg)](https://clojars.org/else-let)\n\n\n# else-let\n\nA Clojure library that adds an `else-let` macro for conditional binding in the face of `nil` values.\n\nInspired by Java's `Optional.orElseGet()` method, this macro evaluates the provided let statement and attempts to bind the variables to the first provided form,\nif that form returns `nil`, `else-let` will bind the value of the second form.\n\nExample:\n\n```clojure\n(else-let [x \"first-value\" \"fallback\"\n           y nil \"will bind this value to y\"\n           z nil nil]\n           (vector x y (nil? z)))\n\n;[\"first-value\" \"will bind this value to y\" true]\n``` \n\n## Usage\n\n### \n\n```clojure\n[else-let \"0.1.0\"]\n```\n\n### Maven\n```xml\n\u003cdependency\u003e\n            \u003cgroupId\u003eelse-let\u003c/groupId\u003e\n            \u003cartifactId\u003eelse-let\u003c/artifactId\u003e\n            \u003cversion\u003e0.1.0\u003c/version\u003e\n        \u003c/dependency\u003e\n```\n\n## License\n\nCopyright © 2018 Nick Robison\n\nDistributed under the Eclipse Public License version 1.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickrobison%2Felse-let","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnickrobison%2Felse-let","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickrobison%2Felse-let/lists"}