% $Id: Assoc.oz,v 1.2 2009/01/10 18:23:29 leavens Exp $ % AUTHOR: Gary T. Leavens declare fun {Assoc AL K} %% ENSURES: Result is the value associated to K in AL case AL of (K2#V|Rest) andthen K==K2 then V|{Assoc Rest K} [] _|KVs then {Assoc KVs K} else nil end end