{"id":21690054,"url":"https://github.com/timdeputter/fitex","last_synced_at":"2025-03-20T12:53:11.703Z","repository":{"id":32799391,"uuid":"36391803","full_name":"timdeputter/FitEx","owner":"timdeputter","description":"FitEx is a Macro-Module which provides a bit of sugar for function definitions.","archived":false,"fork":false,"pushed_at":"2024-03-20T07:15:54.000Z","size":11,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-02T05:51:39.313Z","etag":null,"topics":["elixir","elixir-lang","functional-programming","macros"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/timdeputter.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-05-27T19:51:26.000Z","updated_at":"2024-03-20T07:15:58.000Z","dependencies_parsed_at":"2024-05-01T18:37:58.696Z","dependency_job_id":null,"html_url":"https://github.com/timdeputter/FitEx","commit_stats":null,"previous_names":["puddah/fitex"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timdeputter%2FFitEx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timdeputter%2FFitEx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timdeputter%2FFitEx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timdeputter%2FFitEx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timdeputter","download_url":"https://codeload.github.com/timdeputter/FitEx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244618179,"owners_count":20482316,"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":["elixir","elixir-lang","functional-programming","macros"],"created_at":"2024-11-25T17:28:52.396Z","updated_at":"2025-03-20T12:53:11.673Z","avatar_url":"https://github.com/timdeputter.png","language":"Elixir","readme":"FitEx [![Build Status](https://travis-ci.org/timdeputter/FitEx.svg?branch=master)](https://travis-ci.org/timdeputter/FitEx) [![Hex.pm package version](https://img.shields.io/hexpm/v/FitEx.svg?style=flat)](https://hex.pm/packages/fitex)\n==========\n\nFitEx is a little Macro-Module which provides a alternative way for function definitions.\nIf you need an anonymous functions which takes a single argument like this:\n\n```elixir\nfn param -\u003e param + 1 end\n```\n\nyou can use the short version:\n\n```elixir\nf it + 1\n```\n\nI know, I know... You could use \u0026(\u00261+1). That's right, but maybe the provided syntax is a little bit more readable.\nAnd anyway, I more or less created this to try out macros, inspired by the Kotlin lambda syntax: http://kotlinlang.org/docs/reference/lambdas.html\n\n\n\n## Installation\n\nAdd FitEx as a dependency in your mix.exs file:\n\n```elixir\n  defp deps do\n    [\n      FitEx: \"~\u003e 0.0.1\"\n    ]\n  end\n```\n\nand run `mix deps.get`.\n\n## Usage\n\nBy using FitEx you can write one parameter functions with the f macro. The parameter is named 'it'. \n\n```elixir\ndefmodule SomeModule do\n  use FitEx\n  \n  def some_function do\n    # One liner\n    func = f it + 1\n\n    # or multi line function-body\n    func = f do\n      it_plus_one = it + 1\n      it_plus_one * 2\n    end\n  end\n  \nend\n```\n\n## License\n\nCheck [LICENSE](LICENSE) file for more information.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimdeputter%2Ffitex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimdeputter%2Ffitex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimdeputter%2Ffitex/lists"}