Currently SUBLIST just causes an error if it's found at the start of the line. I was wondering if there's a way we could USE that construct, instead of error-ing out.
So... what do you think about extending SUBLIST, so that if it starts a line (after indent), it wraps the right-hand-block with a list? E.G., EMPTY $ RHS maps to ( RHS )? This might be especially useful for Scheme's "do"; it'd also be handy for let when there's only one variable. For example, here's part of our "basic" example with do (I've "!" indented for HTML readers): do (i(0 {i + 1})) ! \\ ! ! {i = nr1} r ! do ((j 0 {j + 1})) ! ! \\ ! ! ! {j = nc2} ! ! do ! ! ! \\ ! ! ! ! k 0 {k + 1} ! ! ! ! a 0 {a + {matrix-ref(m1 i k) * matrix-ref(m2 k j)}} ! ! ! \\ ! ! ! ! {k = nr2} ! ! ! ! matrix-set!(r i j a) do ! $ i 0 {i + 1} ! $ {i = nr1} r ! do ! ! $ j 0 {j + 1} ! ! $ {j = nc2} ! ! do ! ! ! \\ ! ! ! ! k 0 {k + 1} ! ! ! ! a 0 {a + {matrix-ref(m1 i k) * matrix-ref(m2 k j)}} ! ! ! \\ ! ! ! ! {k = nr2} ! ! ! ! matrix-set!(r i j a) And for single-variable let: let ! $ var1 value1 ! body --- 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