Re: [q-lang-users] composing or lambda?
Brought to you by:
agraef
From: Albert G. <Dr....@t-...> - 2006-11-23 21:16:31
|
Eddie Rucker wrote: > Addendum (add this to the readability/performance question): I also just > discovered I don't need variables (although I saw something like this > somewhere in the docs): > > addSurvey = zipwith (zipwith (+)); > addSurveyId = map (mklist 0 . (#)); Yes, that's what Haskellers call the "pointless style" (pun intended). In Haskell there's no semantic difference between the two styles. In Q there is a slight difference in operational semantics, namely that with a definition like "foo = bar" the expression "foo" is reduced immediately, whereas with "foo X = bar X" you have to supply an argument to foo before a reduction happens. 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 |