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

ElixirによるBEAM言語の作り方とUiroのご紹介

 ElixirによるBEAM言語の作り方とUiroのご紹介

tokyo.ex #1でのLT資料

Yasushi Itoh

April 19, 2016
Tweet

More Decks by Yasushi Itoh

Other Decks in Programming

Transcript

  1. Uiro(Ծ)ίʔυ͸͜Μͳײ͡ # Ϋϥεఆٛʢ1ϑΝΠϧʹ1Ϋϥε΋͘͠͸1ϞδϡʔϧͰ͢ʣ class Person def initialize(name, age) {name: name,

    age: age} end def name() @name end end module Test_Person def test_name() hoge_san = new Person("hoge", 60) hoge_san.name # => "hoge" end end
  2. Uiro(Ծ)ίʔυ͸͜Μͳײ͡ # ϛοΫεΠϯ module uiro_list include Enumerable def reduce(acc, func)

    lists::foldl(func, acc, self) end # ҎԼɺলུ end module test_list def self.test_select() [1, 2, 2, 3].select {|item| item == 2 or item == 3) .unique # => [2, 3] end end