Re: [q-lang-users] Speeding up Q
Brought to you by:
agraef
From: Albert G. <Dr....@t-...> - 2008-04-03 03:06:38
|
Brian Beckman wrote: > Oh, I think I see even more clearly, now. The data constructors "Just" and > "Nothing" are not quite ordinary functions ... they're a special kind of > function that is permitted -- by special rules -- to participate in pattern > matching. But in TRs, any function is permitted in the pattern position > because there's just one kind of function. Right? Right, exactly. Constructors *only* get used in the patterns, and functions *only* get used in the head position in front of the patterns. That is what's called the constructor discipline. Of course, you *can* program like this with TRSes, too (I think that the term "constructor discipline" actually comes from TRS theory), but it's not required. TRSes are therefore conceptually much simpler. Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |