Skip to content
hailelagiPublic

About

re-creating rust's `vec!` macro in elixir

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

22 Commits

Folders and files

Repository files navigation

ExVec

re-creating rust's vec! macro in elixir, read about it here!

Example

defmodule MyApp.DoStuff do
  use ExVec, implementation: :rust

  def len do
    vec!(1..5) |> Enum.count()
  end

  def map_by_2 do
    vec!(1..5) |> Enum.map(fn n -> n * 2 end)
  end
end

Installation

If available in Hex, the package can be installed by adding ex_vec to your list of dependencies in mix.exs:

def deps do
  [
    {:ex_vec, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/ex_vec.

About

re-creating rust's `vec!` macro in elixir

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages