Last active
September 7, 2022 17:31
-
-
Save rugyoga/5231723d6ceea1a9380ce755ae32f147 to your computer and use it in GitHub Desktop.
iex example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iex> nil |> Tree.add(2) |> Tree.add(1) |> Tree.add(3) |> Audit.to_string() |> IO.puts | |
github url: https://github.com/rugyoga/tree_ex/tree/main/lib/tree.ex#L15 | |
local path: lib/tree.ex:15 | |
code: item > i -> %Tree{audit(tree) | right: add(r, item)} | |
diff: [{[:right], {:add, %Tree{item: 3, left: nil, right: nil}}}] | |
===== | |
github url: https://github.com/rugyoga/tree_ex/tree/main/lib/tree.ex#L14 | |
local path: lib/tree.ex:14 | |
code: item < i -> %Tree{audit(tree) | left: add(l, item)} | |
diff: [{[:left], {:add, %Tree{item: 1, left: nil, right: nil}}}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment