Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use lists:duplicate instead of lists:map

  • Loading branch information...
commit 58f56b4c41c2ff74ff904df37d424748b4ed0f70 1 parent e24727e
@runejuhl runejuhl authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/boss_record_lib.erl
View
2  src/boss_record_lib.erl
@@ -44,7 +44,7 @@ is_boss_record(_, _) ->
dummy_record(Module) ->
NumArgs = proplists:get_value('new', Module:module_info(exports)),
- apply(Module, 'new', lists:map(fun(1) -> 'id'; (_) -> undefined end, lists:seq(1, NumArgs))).
+ apply(Module, 'new', ['id'] ++ lists:duplicate(NumArgs-1, undefined)).
attribute_names(Module) ->
DummyRecord = dummy_record(Module),
Please sign in to comment.
Something went wrong with that request. Please try again.