LoginSignup
5
4

More than 5 years have passed since last update.

プログラミング Elixir 第一章

Last updated at Posted at 2016-09-03

概要

プログラミング Elixir

Elixir の概要と、インストール方法、Elixir の REPL である iex の使い方などが紹介されている。Elixir は並列性が高く、関数同士をつなげるのが容易で柔軟性の高い言語とのこと。

インストール方法 (Mac)

Bundler で一発

% brew install elixir

% elixir -v
Elixir 1.3.2

iex

h でヘルプが見れたり、

> h IO.puts

                    def puts(device \\ group_leader(), item)

Writes item to the given device, similar to write/2, but adds a newline at the
end.

i で値の情報を確認できる

> i 123
Term
  123
Data type
  Integer
Reference modules
  Integer

ホームに .iex.exs というファイルを作れば、カラーなど自分で色々とカスタマイズもできるとのこと。

Hello World

初心者の定番 Hello World!!

hello_world.exs
IO.puts 'Hello, World!'
% elixir hello_world.exs
Hello, World!

できたー

5
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
4