{"id":20576520,"url":"https://github.com/divs1210/streamer","last_synced_at":"2025-06-22T10:36:12.409Z","repository":{"id":47174890,"uuid":"136631640","full_name":"divs1210/streamer","owner":"divs1210","description":"threading macro(s) for transducers / transducers re-imagined as streams","archived":false,"fork":false,"pushed_at":"2020-12-27T17:38:25.000Z","size":22,"stargazers_count":42,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-25T10:45:00.966Z","etag":null,"topics":["clojure","transducers"],"latest_commit_sha":null,"homepage":"","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/divs1210.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-06-08T14:47:27.000Z","updated_at":"2024-12-12T05:41:30.000Z","dependencies_parsed_at":"2022-08-20T08:40:29.802Z","dependency_job_id":null,"html_url":"https://github.com/divs1210/streamer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/divs1210/streamer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divs1210%2Fstreamer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divs1210%2Fstreamer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divs1210%2Fstreamer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divs1210%2Fstreamer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/divs1210","download_url":"https://codeload.github.com/divs1210/streamer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divs1210%2Fstreamer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261279913,"owners_count":23134895,"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":["clojure","transducers"],"created_at":"2024-11-16T05:46:03.338Z","updated_at":"2025-06-22T10:36:07.392Z","avatar_url":"https://github.com/divs1210.png","language":"Clojure","readme":"```\nStudy hard what interests you the most in the most undisciplined, irreverent and original manner possible. \n\n- Richard Feynmann\n```\n\n# streamer\n\n[![Clojars Project](https://img.shields.io/clojars/v/divs1210/streamer.svg)](https://clojars.org/divs1210/streamer)\n[![CircleCI](https://circleci.com/gh/divs1210/streamer/tree/master.svg?style=svg)](https://circleci.com/gh/divs1210/streamer/tree/master)\n[![codecov](https://codecov.io/gh/divs1210/streamer/branch/master/graph/badge.svg)](https://codecov.io/gh/divs1210/streamer)\n\n## What\n\nthreading macro(s) for transducers / transducers reimagined as streams\n\n## Usage\n\n```clojure\n(require '[streamer.core\n           :refer [=\u003e transduce! sequence! into!]])\n\n;; Ex. 1\n;; =====\n;; this code\n(=\u003e (range 10)\n    (take 5)\n    (map inc)\n    (transduce! *))\n\n;; is the same as\n(-\u003e\u003e (range 10)\n     (take 5)\n     (map inc)\n     (reduce *))\n\n;; and compiles to\n((fn [%xform %coll]\n   (transduce %xform * %coll)) (comp (take 5) \n                                     (map inc))\n                               (range 10))\n\n;; and can also be written as\n(=\u003e (range 10)\n    (take 5)\n    (map inc)\n    (transduce %xform * %coll))\n\n\n;; Ex. 2\n;; =====\n;; this code\n(=\u003e (range 10)\n    (filter odd?)\n    (map inc)\n    (sequence!))\n\n;; is the same as\n(-\u003e\u003e (range 10)\n     (filter odd?)\n     (map inc))\n\n;; and compiles to\n((fn [%xform %coll]\n   (sequence %xform %coll)) (comp (filter odd?) \n                                  (map inc))\n                            (range 10))\n\n;; and can also be written as\n(=\u003e (range 10)\n    (filter odd?)\n    (map inc)\n    (sequence %xform %coll))\n\n\n;; Ex. 3\n;; =====\n;; this code\n(require '[net.cgrand.xforms :as x])\n(=\u003e (range 8)\n    (x/partition 2)\n    (map vec)\n    (into! {}))\n\n;; is the same as\n(-\u003e\u003e (range 8)\n     (partition 2)\n     (map vec)\n     (into {}))\n\n;; and compiles to\n((fn [%xform %coll]\n   (into {} %xform %coll)) (comp (x/partition 2)\n                                 (map vec))\n                           (range 8))\n\n;; and can also be written as\n(=\u003e (range 8)\n    (x/partition 2)\n    (map vec)\n    (into {} %xform %coll))\n```\n\n## Profit?\n\n```clojure\n(time (dotimes [_ 1000000]\n        (=\u003e (range 10)\n            (filter even?)\n            (map #(Math/sqrt %))\n            (transduce! *))))\n\"Elapsed time: 550.802941 msecs\"\n\n(time (dotimes [_ 1000000]\n        (-\u003e\u003e (range 10)\n             (filter even?)\n             (map #(Math/sqrt %))\n             (reduce *))))\n\"Elapsed time: 1157.937817 msecs\"\n```\n\n## License\n\nCopyright © 2018 Divyansh Prakash\n\nDistributed under the Eclipse Public License either version 1.0.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivs1210%2Fstreamer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdivs1210%2Fstreamer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivs1210%2Fstreamer/lists"}