I hereby claim:
- I am josevalim on github.
- I am josevalim (https://keybase.io/josevalim) on keybase.
- I have a public key whose fingerprint is E140 099F 114F 4B2A 21FE 2E69 E337 0FF7 D467 E599
To claim this, I am signing this object:
$ mix app.tree | |
demo | |
├── elixir | |
├── phoenix | |
│ ├── elixir | |
│ ├── plug | |
│ │ ├── elixir | |
│ │ ├── crypto | |
│ │ └── logger | |
│ │ └── elixir |
I hereby claim:
To claim this, I am signing this object:
$ git clone git@github.com:elixircnx/comeonin.git
$ cd comeonin/
$ git checkout develop
$ mix deps.get
$ mix test
defmodule Interleave do | |
def interleave(a, b) do | |
af = Seq.impl_for(a) | |
bf = Seq.impl_for(b) | |
do_interleave_1(af, a, bf, b, []) |> :lists.reverse() | |
end | |
defp do_interleave_1(af, a, bf, b, acc) do | |
case af.next(a) do | |
{ :next, i, a } -> |
% from my unit tests | |
foo = 10 | |
assert 10 == my_macro(:foo) | |
assert 10 == my_macro("foo") | |
% macro | |
defmacro my_macro(some_var) when is_atom(some_var) do |
defmodule Dict.Behaviour do | |
# It is assumed that the client module implements following functions: | |
# | |
# size/1, fetch/2, put/3, reduce/3, update/4, delete/2 | |
# | |
defmacro __using__(_) do | |
quote do | |
# Following are exact copies of HashDict: | |
def get(dict, key, default // nil) do |
defmodule ExCoder do | |
vars = [ { "	", " " }, | |
{ "!", "!" }, | |
{ "" "", "\"" }, | |
{ "#", "#" }, | |
{ "$", "$" }, | |
{ "%", "%" }, | |
{ "& &", "&" }, | |
{ "'", "'" }, | |
{ "(", "(" }, |
Warden::Manager.after_authentication do |record, warden, options| | |
warden.request.session.try(:delete, :_csrf_token) | |
end |
def next_state do | |
(board, x, y) -> | |
cell = cell_at(board, x, y) | |
live_count = live_neighbors(board, x, y) | |
next_state(cell, live_count) | |
(_, x, y) when (x < 0 or y < 0) -> | |
"." | |
end | |
def next_state do |