See also merge sort.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(gist). | |
-export([authenticate/3]). | |
authenticate(UserName, Pass, IPAddress) -> | |
Checks = [fun user_ok/1, | |
fun password_ok/1, | |
fun ipaddr_ok/1 | |
], | |
{Result, _} = lists:foldl( | |
fun(_CheckFun, {{error, Reason}, _}) -> |