Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Elixir: Gentle Introduction to Functional Programming

bbense
October 30, 2014

Elixir: Gentle Introduction to Functional Programming

Slides for a lightning talk introducing elixir at the Stanford IT Unconference

bbense

October 30, 2014
Tweet

Other Decks in Programming

Transcript

  1. • { code , results } = File.Stat(path) • {

    :ok , results } = File.Stat(path)
  2. • { code , results } = File.Stat(path) • {

    :ok , results } = File.Stat(path)
  3. def build({options,[head | tail]}) do {options,process( head ),tail } end

    def build_paths(:help) do IO.puts @moduledoc System.halt(0) end
  4. def build({options,[head | tail]}) do {options,process( head ),tail } end

    def build_paths(:help) do IO.puts @moduledoc System.halt(0) end
  5. if( a == 1 , do: b = 1, :else

    b = 2) if a == 1 do b = 1 else b = 2 end
  6. if( a == 1 , do: b = 1, :else

    b = 2) if a == 1 do b = 1 else b = 2 end
  7. time elixir --erl "+P 1000000" -r chain.exs -e "Chain.run(1_000_000)" {13896652,

    "Result is 1000000”} 15.75 real 7.26 user 8.45 sys
  8. time elixir --erl "+P 1000000" -r chain.exs -e "Chain.run(1_000_000)" {13896652,

    "Result is 1000000”} 15.75 real 7.26 user 8.45 sys
  9. More Resources • www.elixir-lang.org - Installation instructions and excellent tutorial.

    • Goggle Groups : elixir-lang-talk • Stack Overflow: tag elixir