% from a small directory searching routine% This is a disjunction. The closest thing you could relate it to in imperative programming is a set of logical-or statements, or kind of a switch statement.% PathType has been assigned, OutPath has not been assigned yet. Both are a 'maybe' type.( PathType = yes(directory), OutPath = yes(InPath); % After each semicolon is another possible state. PathType = yes(file), OutPath = yes(InPath); PathType = no, OutPath = no)
But, perhaps there might be something to developing code in functional languages, I just worry about unnecessary verbosity and the time to completion ratio as well as the average bugs per hour one makes in it compared to other languages. Then in terms of 'correctness' are functional apps better in this area or fall into pitfalls too? I'm just not sure on that.