Skip to content
/ prefix Public

the world is your playground, ∀ Q, ∃h, ∀ f, g ∈ Q, s.t h(f, g) "then" f ≡ g + f

Notifications You must be signed in to change notification settings

cjen07/prefix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prefix

"add" g to f

defmodule Q do
  
  def i() do
    :ok
  end

  def f() do
    IO.puts "world"
  end

  def g() do
    IO.puts "hello"
  end

  def f(a) do
    IO.puts a
  end

  def ff() do
    f()
    f()
  end

end
iex -S mix
Q.f
# => world
# => :ok
Q.f "cjen07"
# => cjen07
# => :ok
Q.ff
# => world
# => world
# => :ok
Z.h :f, :g
# => :ok
Q.f
# => hello
# => world
# => :ok
Q.f "cjen07"
# => hello
# => cjen07
# => :ok
Q.ff
# => hello
# => world
# => hello
# => world
# => :ok
Z.h :f, :i
# => :ok
Q.f
# => world
# => :ok
Q.f "cjen07"
# => cjen07
# => :ok
Q.ff
# => world
# => world
# => :ok

remark

  • Z.h: without code change, reversible

  • Z.i: with code change, irreversible

About

the world is your playground, ∀ Q, ∃h, ∀ f, g ∈ Q, s.t h(f, g) "then" f ≡ g + f

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages