@psikosen/

SteelMessyDemands

Elixir

No description

fork
loading
Files
  • main.exs
main.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
defmodule User do
  defstruct name: "John", age: 27
end

defmodule Main do
  def main do
    john = %User{}
    IO.puts(john.name)
    IO.puts(john.age)
  end
end


Main.main()


t  = spawn fn ->  1 + 2 end

IO.puts(t)

IO.puts("========================================")

send(self(),{:succ, "Suck On Me, When you're not strong"})

receive do
   {:succ, msg} -> IO.puts(msg)
   {:world, msg} -> IO.puts("Wha homie ight me")
end
IO.puts("========================================")

send(self(), {:hello, "Hi people"})

receive do
   {:hello, msg} -> IO.puts(msg)
   {:another_case, msg} -> IO.puts("This one won't match!")
end


IO.puts("========================================")