Interesting topic; not the best of examples though.
And Lazarus already has out of the box support for hashes (and so has Delphi IIRC).
So no need to reinvent the wheel (except when you want to make a better wheel
).
Yeah i know. I got two kids running around the house so i didnt have time for any better

Added a more practical example:
When working with filestreams you usually end up with either opening up an existing file, or creating a new one. In this particular case it means that there are only two possible outcomes. Which just happens to be the behavior of a boolean value. So we can save us some code by taking advantage of this in a minimalistic lookup array:
Procedure TForm1.OpenFile(filename:String);
const
CLookup:array[boolean] of word = (fmCreate,fmOpenRead);
var
mFile: TFileStream;
Begin
try
mFile:=TFileStream.Create(filename,CLookup[fileexists(filename)]);
try
//Use stream here
finally
mfile.free;
end;
except
on e: exception do
Raise exception.CreateFmt('Failed to access file <%s>, %s',[e.message]);
end;
end;