Prev: intro to chinese punctuation for english speakers (with computing & linguistic perspective)
Next: intro to chinese punctuation for english speakers (with computing & linguistic perspective)
From: Norbert_Paul on 8 Aug 2010 14:07 ccc31807 wrote: > The usual template for a recursive function recurs down the list > applying some test and returns when the list is null. > > If you are testing each element for some value to see if all values in > the list meet the test, you will return nil if some value fails the > test. If every value meets the test, you return T when the list is > null. > > However, if the input list is null, this function will return T, even > though no element of the list meets the test. For example, to test > whether all the members of the list are equal to 7: > > (defun all-seven (ls) > (cond > ((null ls) t) > ((/= 7 (car ls)) NIL) > (t (all-seven (cdr ls))))) > > If you pass the function the empty list, it returns true, even though > no element of the list is equal to 7. What is the logic to fix this > problem? If someone "fixed" this kind of "problem" I'd refuse to use his software. Note: All martians are green and have antenna on their heads. Disagree? But there exists no martian who is not. Norbert
From: George Neuner on 8 Aug 2010 20:42 On Sun, 08 Aug 2010 20:07:47 +0200, Norbert_Paul <norbertpauls_spambin(a)yahoo.com> wrote: >Note: All martians are green and have antenna on their heads. >Disagree? But there exists no martian who is not. Absolutely disagree. Everyone knows martians are pink [1,2]. Oh wait, maybe everyone knows martians are brown [3]. [1] http://www.imdb.com/title/tt0046534/ [2] http://www.imdb.com/title/tt0116996/ [3] http://www.imdb.com/title/tt0062168/
From: Tim Bradshaw on 9 Aug 2010 06:34 On 2010-08-09 01:42:20 +0100, George Neuner said: > > Oh wait, maybe everyone knows martians are brown [3]. I think it was the sky that was brown, I don't remember the colour of the martians being specified.
From: Norbert_Paul on 9 Aug 2010 09:13 George Neuner wrote: > On Sun, 08 Aug 2010 20:07:47 +0200, Norbert_Paul > <norbertpauls_spambin(a)yahoo.com> wrote: > >> Note: All martians are green and have antenna on their heads. >> Disagree? But there exists no martian who is not. > > Absolutely disagree. Everyone knows martians are pink [1,2]. > Oh wait, maybe everyone knows martians are brown [3]. You don't disagree at all. Of course, all martians are pink, and brown, and odd (and even ...). Norbert
From: George Neuner on 9 Aug 2010 11:33
What the Colors of Your Job Interview Clothes ConveyOn Mon, 9 Aug 2010 11:34:23 +0100, Tim Bradshaw <tfb(a)tfeb.org> wrote: >On 2010-08-09 01:42:20 +0100, George Neuner said: >> >> Oh wait, maybe everyone knows martians are brown [3]. > >I think it was the sky that was brown, I don't remember the colour of >the martians being specified. Yup, the martian sky was brown, as told by the man in the church having visions of the ancient racial purges. So too were the martians which were pulled from the craft in the subway: they looked like giant grasshoppers or locusts, brown and gray green, missing the wings and second pair of legs, but with horns on the head and with a third hind leg. Fun movie. Explains why humans can't get along with one another. George |