ericmj/ex2ms


:ets.fun2ms for Elixir, translate functions to match specifications

Language: Elixir


ex2ms

Build Status

Translates Elixir functions to match specifications for use with ets. Requires Elixir 1.0 or later.

Usage

Add ex2ms to your Mix dependencies:

defp deps do
  [{:ex2ms, "~> 1.0"}]
end

In your shell write the following to get up and running to try ex2ms out:

mix deps.get
iex -S mix
iex(1)> import Ex2ms
iex(2)> fun do { x, y } = z when x > 10 -> z end
[{{:"$1",:"$2"},[{:>,:"$1",10}],[:"$_"]}]
iex(3)> :ets.test_ms({ 42, 43 }, v(2))
{:ok,{42,43}}
iex(4)> :ets.test_ms({ 0, 10 }, v(2))
{:ok,false}

License

Copyright 2013 Eric Meadows-Jönsson

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Project Statistics

Sourcerank 10
Repository Size 55.7 KB
Stars 181
Forks 28
Watchers 8
Open issues 0
Dependencies 0
Contributors 15
Tags 12
Created
Last updated
Last pushed

Top Contributors See all

Eric Meadows-Jönsson Martin Schürrer Nikolay Amiantov Petr Stepchenko Iuri Fernandes Ludovic Dem Mitchell Henke Andy Brennan Mike Buhot Low Kian Seong Lars Wikman Glenn Rempe Dmitry Russ Chris McGrath Patrick Hereford

Packages Referencing this Repo

ex2ms
Translates Elixir functions to match specifications for use with `ets`.
Latest release 1.7.0 - Updated - 181 stars

Recent Tags See all

v1.7.0 February 10, 2024
v1.6.1 August 06, 2021
v1.6.0 December 13, 2019
v1.5.0 February 24, 2017
v0.15.0 February 24, 2017
v1.4.0 February 18, 2016
v1.3.0 February 18, 2016
v1.2.0 August 17, 2014
v1.1.0 July 27, 2014
v1.0.1 June 20, 2014
v1.0.0 June 12, 2014
v0.1.0 June 30, 2013

Something wrong with this page? Make a suggestion

Last synced: 2024-02-10 19:02:48 UTC

Login to resync this repository