Created
June 5, 2017 12:23
-
-
Save elbrujohalcon/252daf5f82ed53a945d3ae7ab657cb2d to your computer and use it in GitHub Desktop.
Sample for my new blog post
This file contains hidden or 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
-module(expand). | |
-export([good/0, bad/0, wat/0]). | |
good() -> | |
ListIn = [a, b, c], | |
Expansions = [{a, [expanded]}, {b, [expanded, too]}], | |
proplists:expand(Expansions, ListIn). | |
bad() -> | |
ListIn = [a, b, c], | |
Expansions = [{a, expanded}, {b, expanded}], | |
proplists:expand(Expansions, ListIn). | |
wat() -> | |
ListIn = [a, b, c], | |
Expansions = [{a, expanded}, {b, [expanded, too]}], | |
proplists:expand(Expansions, ListIn). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment