Skip to content

Commit a79fbd1

Browse files
committed
add ai_proplists and bump version to 0.3.5
1 parent d948599 commit a79fbd1

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PROJECT = ailib
22
PROJECT_DESCRIPTION = Base lib for products from ailink.io
3-
PROJECT_VERSION = 0.3.4
3+
PROJECT_VERSION = 0.3.5
44

55
include erlang.mk
66

src/stdlib/ai_proplists.erl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
-module(ai_proplists).
2+
-export([merge/2]).
3+
4+
merge(P1,[]) ->P1;
5+
merge(P1,[{K,_} = H| T]) ->
6+
case proplists:is_defined(K,P1) of
7+
true -> merge(P1,T);
8+
false -> merge([H|P1],T)
9+
end.

0 commit comments

Comments
 (0)