IMO a much simpler treatment is "if the list is improper, use nfx" without counting anything.
So in order for the "alternating symbol" rule to trigger: 1. The contents should be a proper list 2. The list should have an odd number of elements 3. The even elements (counting the first element as odd) should be the same symbol, as compared by eq? and must return true when applied to the symbol? predicate otherwise, (cons 'nfx <>) on the list. On Fri, Aug 17, 2012 at 9:38 PM, David A. Wheeler <dwhee...@dwheeler.com> wrote: > I said: >> I think that if you have an improper list, the last ("improper") item should >> count as length 1. > > Hmm, my modified implementation isn't exactly the same as my proposed > description, and I'm not sure which one is best. > > The modified implementation translates: > {a + . z} > into: > (nfx a + . z) > > If I was serious about "improper = length 1" then it should be "(+ a . > z)"instead. > > This is all an edge case. The most *important* thing is to avoid crashing > and to have a concise universal definition. That said, I'd like even the > edge cases to be soundly justified and "obviously right". Thoughts? > > --- David A. Wheeler > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Readable-discuss mailing list > Readable-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/readable-discuss ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Readable-discuss mailing list Readable-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/readable-discuss