Module mochilists

Utility functions for dealing with proplists.

Copyright © Copyright (c) 2010 Mochi Media, Inc.

Authors: David Reid (dreid@mochimedia.com).

Description

Utility functions for dealing with proplists.

Function Index

get_value/2Return the value of Key or undefined.
get_value/3Return the value of Key or Default
is_defined/2Returns true if Propist contains at least one entry associated with Key, otherwise false is returned.
set_default/2Return new Proplist with {Key, Value} set if not is_defined(Key, Proplist).
set_defaults/2Return new Proplist with {Key, Value} set if not is_defined(Key, Proplist).

Function Details

get_value/2

get_value(Key::term(), Proplist::list()) -> term() | undefined

Return the value of Key or undefined

get_value/3

get_value(Key::term(), Proplist::list(), Default::term()) -> term()

Return the value of Key or Default

is_defined/2

is_defined(Key::term(), Proplist::list()) -> bool()

Returns true if Propist contains at least one entry associated with Key, otherwise false is returned.

set_default/2

set_default(X1::{Key::term(), Value::term()}, Proplist::list()) -> list()

Return new Proplist with {Key, Value} set if not is_defined(Key, Proplist).

set_defaults/2

set_defaults(DefaultProps::[{Key::term(), Value::term()}], Proplist::list()) -> list()

Return new Proplist with {Key, Value} set if not is_defined(Key, Proplist).


Generated by EDoc