attempt/2 | Catches errors from an error-throwing function. |
attempt/3 | Catches errors and returns a default value if error thrown. |
breed/1 | Returns a copy of a deep aggregate of data with each Fun/0 object contained within replaced by the result of running it. |
call_stack/0 | Returns the current Erlang call stack (not including
ce_lib:call_stack/0 ). |
clean/2 | Evaluate a given Fun with a new, temporary process dictionary. |
compose/1 | Composes a function by chaining the results of a list of functions. |
eval/1 | Evaluates a string as an Erlang expression. |
iterate/4 | Implements iteration with a counter variable. |
place/2 | Places the given value in the process dictionary iff the given key does not yet exist. |
repeat/2 | Implements opaque finite repetition. |
to_float/2 | Tries to convert any term into a float, using default value if it cannot be done. |
to_integer/2 | Tries to convert any term into an integer, using default value if it cannot be done. |
to_string/1 | |
to_string/2 | Tries to convert any term into a string, using default value if it cannot be done. |
attempt(F::function(), Args::[term()]) -> {ok, term()} | {error, term()}
Catches errors from an error-throwing function. Thanks to Thomas Arts for this code.
attempt(F::function(), Args::[term()], Default::term()) -> term()
Catches errors and returns a default value if error thrown. Also can be used with functions which return {ok, Result} | {error, Why}.
breed(T::term()) -> term()
Returns a copy of a deep aggregate of data with each Fun/0 object contained within replaced by the result of running it.
call_stack() -> [{Module, Function, Arity}]
Returns the current Erlang call stack (not including
ce_lib:call_stack/0
).
Evaluate a given Fun with a new, temporary process dictionary. The new process dictionary will contain only the values given to clean/2, and will be reset to the old process dictionary after the Fun has been evaluated. Simulates local variables with dynamic scope as found in many non-single-assignment languages.
compose(FnTail::[function()]) -> function()
Composes a function by chaining the results of a list of functions. Thanks to Alex Peake for this code.
eval(S::string()) -> term()
Evaluates a string as an Erlang expression. This adds reflectivity to Erlang with a simple, Perl-like interface.
iterate(I::integer(), Q::integer(), Fun::'fun'(), Acc::term()) -> term()
Implements iteration with a counter variable. Not dissimilar to 'for loops' in other languages.
place(Key::term(), Value::term()) -> ok
Places the given value in the process dictionary iff the given key does not yet exist. Exclusive use of place/2 instead of erlang:put/2 imposes the restriction of single-assignment on the process dictionary.
repeat(N::integer(), F::'fun'()) -> [term()]
Implements opaque finite repetition. Not dissimilar to the 'repeat' loop in LOGO. This version is tail-recursive and returns a list of all evaluated results.
to_float(F::term(), D::float()) -> float()
Tries to convert any term into a float, using default value if it cannot be done.
to_integer(F::term(), D::integer()) -> integer()
Tries to convert any term into an integer, using default value if it cannot be done.
to_string() -> term()
to_string(F::term(), D::string()) -> string()
Tries to convert any term into a string, using default value if it cannot be done.
Generated by EDoc, Dec 25 2007, 02:37:31.