The first function matches any call to it with an error - this is how (apparently) you pass error information on to the result. There's no graceful exit with an error.
The keyword list is pointless with an error function.
This is, of course, exactly identical to how things work in Erlang, as well. A lot of conditional logic is done implicitly through polymorphic functions of the same arity that pattern match on parameters. Proplists are a surprisingly versatile data structure to exploit.
[+] [-] eridius|10 years ago|reply
Same issue with the keyword list version, your error function doesn't take a keyword list at all, just the {:error, err} argument.
[+] [-] robconery|10 years ago|reply
The keyword list is pointless with an error function.
[+] [-] vezzy-fnord|10 years ago|reply
[+] [-] vvanders|10 years ago|reply