hex logo Hex
Packages Pricing Docs
Log In
Packages Pricing Docs Log In
Packages

ex_kits

0.2.9
0.2.9 0.2.8 0.2.7 0.2.6 0.2.5 0.2.4 0.2.3 0.2.2 0.2.1 0.2.0 0.1.1 0.1.0

Some useful kits for elixir development

HexDocs

Current section

Files

Jump to
Readme
12 Versions
2 Dependencies
Dependants
Files
Activity
Readme 12 Versions 2 Dependencies Dependants Files Activity
ex_kits lib macros function.ex
Raw

22 files

      • assertion.ex
      • constants.ex
      • function.ex
      • go.ex
      • types.ex
  • .formatter.exs
  • LICENSE
  • Makefile
  • README.md
  • mix.exs

Package files

  • .formatter.exs
  • lib/crypto/aes.ex
  • lib/crypto/common.ex
  • lib/crypto/fnv1a.ex
  • lib/crypto/ssl.ex
  • lib/macros/assertion.ex
  • lib/macros/constants.ex
  • lib/macros/function.ex
  • lib/macros/go.ex
  • lib/macros/types.ex
  • lib/utils/buffer.ex
  • lib/utils/buffer_v2.ex
  • lib/utils/const.ex
  • lib/utils/debug.ex
  • lib/utils/exception.ex
  • lib/utils/param.ex
  • lib/utils/time.ex
  • lib/utils/uvarint.ex
  • LICENSE
  • Makefile
  • mix.exs
  • README.md

lib/macros/function.ex

defmodule ExKits.Macros.FunctionGenerator do
@moduledoc """
This module provides a macro for generating functions in Elixir code.
```elixir
require FunctionGenerator
FunctionGenerator.generate_function :add, [a, b], do: a + b
```
"""
defmacro generate_function(name, args, code) do
quote do
def unquote(name)(unquote_splicing(args)) do
unquote(code)
end
end
end
end
hex logo Hex
About Blog Sponsors Status Advisories
Documentation FAQ Specifications Report Client Issue Report General Issue Report Security Issue Contact Support
Code of Conduct Terms of Service Privacy Policy Copyright Policy Dispute Policy

Copyright 2015. Six Colors AB.

Powered by the Erlang VM and the Elixir Programming Language

Search filters

Type any of these into the search box. They can be combined with free text which searches package names and descriptions.

Operator Description Example
name: Match package name. Supports * wildcards and repo/package form name:phx* or name:hexpm/phoenix
description: Full-text search of package descriptions description:auth
depends: Packages depending on a given package. Supports repo:package form depends:ecto or depends:hexpm:ecto
build_tool: Filter by build tool build_tool:mix
updated_after: Packages updated after an ISO8601 datetime updated_after:2025-01-01T00:00:00Z
extra: Match custom metadata (key,value). Nested keys are separated by commas extra:license,MIT

Wrap values in double quotes to include spaces, e.g. name:"my package".