Created
February 2, 2016 14:09
-
-
Save eibrahim/0bb929360bdb4732b5e0 to your computer and use it in GitHub Desktop.
List subtraction and concatenation
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
def list_concat a,b do a ++ b end | |
def list_sub a,b do a -- b end | |
#you can test this in iex | |
list_concat2 = &(&1 ++ &2) | |
list_concat2.([1,2],[3,4]) | |
list_sub2 = &(&1 -- &2) | |
list_sub2.([1,2,3,4], [3,9,8,2]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment