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

Elixir ご紹介

Naoya Ito
August 25, 2015

Elixir ご紹介

Shibuya.ex #1 での発表資料です

Naoya Ito

August 25, 2015
Tweet

More Decks by Naoya Ito

Other Decks in Technology

Transcript

  1. ͳ͍΋ͷ •  Ͱ͸ ͳ͍ – ੩తܕ෇͚ – ७ਮؔ਺ܕ ෭࡞༻͋Γ  – ෦෼ద༻ΧϦʔԽ – 0QUJPOܕ

    .BZCF  •  ͋ΔΑ – Ϧετ಺แදه – ஗ԆධՁɺແݶϦετ ˞ݴޠશମͰ͸ͳ͍ 
  2. ෆมͳσʔλܕ •  σʔλܕ͸ෆม – 4USJOH -JTU 5VQMF .BQ )BTI%JDU  )BTI4FU

    •  ཁ͢Δʹഁյతૢ࡞͕ෆՄೳ͚ͬͯͩ •  dict2  =  Dict.put(dict,  :foo,  3)   – dict  ͸ෆมɺߋ৽͞Εͨ  dict2
  3. GPS XIJMF͕ͳ͍ •  ࠶ؼΛ࢖͏͔ ຤ඌݺͼग़͠࠷దԽ  •  ͞΋ͳ͘͹ϧʔΫɺ&OVNΛ࢖͑ iex>  [1,2,3]

     |>  Enum.each  fn(x)  -­‐>  IO.puts(x)  end   1   2   3   :ok     iex>  [1,2,3]  |>  Enum.reduce(0,  fn(x,  acc)  -­‐>  x  +  acc  end)   6
  4. Ϧετ಺แදه •  )BTLFMM౳Ͱ͓ͳ͡Έͷ – [x  |  x  <-­‐  xs,  x  <

     p]     •  &MJYJSͰ͸ – for  x  <-­‐  xs,  x  <  p,  do:  x   ਖ਼௚͜Εʹؔͯ͠͸ &SMBOHͦͷ··Ͱྑ͔ͬ ͨͷͰ͸ŋŋŋ ݸਓͷײ૝ 
  5. ΞΫλʔϞσϧ •  ϓϩηεؒ௨৴͸ϝοηʔδύογϯά – ϓϩηεͷதʹʮϝʔϧϘοΫεʯ •  ͦ͜ʹϝοηʔδΛૹΔ TFOE  •  ϝοηʔδʹ͸೚ҙͷ஋Λఴ෇Մ

    – ϓϩηε͸ͦΕΛड৴଴ͪ SFDFJWF  – ஋͸ඞͣίϐʔ͞ΕΔ ڞ༗͞Εͳ͍  •  σʔλΛڞ༗͠ͳ͍㱺ϩοΫ͕͍Βͳ͍
  6. &MJYJSೖ໳ιʔε ೔ຊޠ  •  8FC %#13&44WPM –  IUUQHJIZPKQNBHB[JOFXEQSFTTBSDIJWFWPM  • 

    +PF@OPI͞ΜͷεϥΠυू –  IUUQXXXTMJEFTIBSFOFU+PF@OPIQSFTFOUBUJPOT •  (FUUJOH4UBSUFEͷ຋༁ –  IUUQFMJYJSKBTFOBOFUXPSLTHFUUJOH@TUBSUFEIUNM •  2JJUBr&MJYJS –  IUUQTRJJUBDPNUBHTFMJYJS