PDF Archive

Easily share your PDF documents with your contacts, on the Web and Social Networks.

Share a file Manage my documents Convert Recover PDF Search Help Contact



einstein hack elixir 0430 .pdf


Original filename: einstein-hack-elixir-0430.pdf

This PDF 1.4 document has been generated by Google / , and has been sent on pdf-archive.com on 03/05/2017 at 14:05, from IP address 121.33.x.x. The current document download page has been viewed 296 times.
File size: 459 KB (59 pages).
Privacy: public file




Download original PDF file









Document preview


爱因斯坦搞炼丹
Elixir: A Haskeller's Perspective

Bio
知乎@祖与占 (FP/Haskell/PL)
<3 Haskell
Programming Language Fanboy
some experience of Elang/Elixir

Elixir is a dynamic, functional language
designed for building scalable and
maintainable applications.
elixir-lang.org

Learn Elixir in Y Minute
-

Elixir -> Erlang Abstract Format -> BEAM Byte code
Ruby like, Programmable Syntax (Macro, Special Forms)
Immutable
Everything is an expression
if 42 do
"foo"
else
"bar"
end
# => "foo"

if 42, do: "foo", else: "bar"

if(42, [{:do, "foo"}, {:else, "bar"}])

Learn Elixir in Y Minute
defmodule Foo.Baz do
@moduledoc “example”
def baz(arg0, arg1) do
Enum.map([{:ok, 1}, {:err, 2}], fn {:err, n} -> {:ok, n - 1} ; a -> a end)
end
end
end

Tricks
Section:
iex > 20 |> Kernel.+(1) |> Kernel.*(2) # Haskell (*2) . (+1) $ (20)
42
Lens:
iex> list = [%{name: "john"}, %{name: "mary"}]
iex> get_and_update_in(list, [Access.all(), :name], fn
...> prev -> {prev, String.upcase(prev)}
...> end)
{["john", "mary"], [%{name: "JOHN"}, %{name: "MARY"}]}

small goal

The Billion Dollar
Mistake


Related documents


einstein hack elixir 0430
elixir hs rubyconf ver
thenightwatch
cjresume2017
62005
matching human resources


Related keywords