That kind of thing makes a lot of sense to me.
I'd probably write the code a little bit differently, having a
function that takes a string and sees if the text starting at
start-pos matches that string instead of having to special case the
numbers 1, 2, 3, 5, and 7. This will also let you just
On Mon, Nov 26, 2012 at 11:31 AM, Robby Findler ro...@eecs.northwestern.edu
wrote:
That kind of thing makes a lot of sense to me.
I'd probably write the code a little bit differently, having a
function that takes a string and sees if the text starting at
start-pos matches that string
I'd write a helper function like this:
(define (has? str) (equal? str (get-text start-pos (+ start-pos
(string-length str)
and call it a bunch (inside an 'or', one branch for each of those
strings that are currently in the second argument to member; or well,
even use a for/or, I guess). Or,
and call it a bunch (inside an 'or', one branch for each of those
strings that are currently in the second argument to member; or well,
even use a for/or, I guess). Or, if you wanted, you could change your
existing code to push the 'or' inside the 'and' and then drop the
promise.
Ok, I'll
If you're really worried about the allocation, you can work at the
snip level and pass in a buffer to be filled in with characters, you
know. :)
On Mon, Nov 26, 2012 at 2:44 PM, Danny Yoo d...@hashcollision.org wrote:
and call it a bunch (inside an 'or', one branch for each of those
strings
At least, as far as I can tell, it does not perform any better than the
splay tree. It's actually about a second slower when indenting
drracket/private/unit.rkt. Darn it.
However, I did find something that's slightly nutty: the following patch
appears to greatly improve indentation:
6 matches
Mail list logo