Created
February 13, 2012 23:19
-
-
Save dhruvchandna/1821384 to your computer and use it in GitHub Desktop.
Seven Languages In Seven Weeks: Erlang: Day2: Ex1
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
% Function that takes in a keyword and list of the form | |
% [{ruby,"an OO language"}, {erlang,"a functional language"}] | |
% and returns the associated value for the keyword. | |
Value = fun(X,L) -> [Y || {Z,Y} <- L, X=:=Z] end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment