Carl D. Sorensen wrote:
> > I *am* interested in helping with this, but could someone apply my
> > final patch on this?
> > http://lists.gnu.org/archive/html/lilypond-devel/2009-06/msg00528.html
> >
> > It's been almost a month since I started with this...
> > http://lists.gnu.org/archive/html/li
On 6/24/09 10:36 AM, "Mark Polesky" wrote:
>
>
> Han-Wen Nienhuys wrote:
(eq? (split-at-predicate odd? '(2 3 6 8 9 0))
'((2) (6 8) (0)))
holds. It would be .ly file that runs Scheme function on a
set of inputs, and compares them to a set of outputs to make
On 6/23/09 11:48 PM, "Mark Polesky" wrote:
>
>
> Han-Wen Nienhuys wrote:
>> I mean to have an automated set of tests, that checks for example that
>>
>> (eq? (split-at-predicate odd? '(2 3 6 8 9 0))
>>'((2) (6 8) (0)))
>>
>> holds. It would be .ly file that runs Scheme function
Han-Wen Nienhuys wrote:
> >> (eq? (split-at-predicate odd? '(2 3 6 8 9 0))
> >>'((2) (6 8) (0)))
> >>
> >> holds. It would be .ly file that runs Scheme function on a
> >> set of inputs, and compares them to a set of outputs to make
> >> sure that they match.
> >
> > I second that, but w
On Wed, Jun 24, 2009 at 4:18 AM, Jan
Nieuwenhuizen wrote:
>> (eq? (split-at-predicate odd? '(2 3 6 8 9 0))
>> '((2) (6 8) (0)))
>>
>> holds. It would be .ly file that runs Scheme function on a set of
>> inputs, and compares them to a set of outputs to make sure that they
>> match.
>
> I
Op woensdag 24-06-2009 om 02:08 uur [tijdzone -0300], schreef Han-Wen
Nienhuys:
> I mean to have an automated set of tests, that checks for example that
>
>
> (eq? (split-at-predicate odd? '(2 3 6 8 9 0))
>'((2) (6 8) (0)))
>
> holds. It would be .ly file that runs Scheme function on
Han-Wen Nienhuys wrote:
> I mean to have an automated set of tests, that checks for example that
>
> (eq? (split-at-predicate odd? '(2 3 6 8 9 0))
>'((2) (6 8) (0)))
>
> holds. It would be .ly file that runs Scheme function on a set of
> inputs, and compares them to a set of outputs t
On Tue, Jun 23, 2009 at 6:12 PM, Mark Polesky wrote:
>> Maybe you guys can look into making a test framework for the
>> Scheme library functions.
>>
>> It should be fairly simple to check the functions (like you do
>> here ad-hoc) in a separate .scm file that is loaded if you run
>> ly/test-scm-fu
Han-Wen Nienhuys wrote:
> > I also took a look at the next procedure,
> > split-list-by-separator. My revised version is below. Unless I
> > hear otherwise, I'll send a patch soon.
>
> Maybe you guys can look into making a test framework for the
> Scheme library functions.
>
> It should be fairly
On Tue, Jun 23, 2009 at 4:07 PM, Mark Polesky wrote:
>
> I also took a look at the next procedure, split-list-by-separator.
> My revised version is below. Unless I hear otherwise, I'll send a
> patch soon.
Maybe you guys can look into making a test framework for the Scheme
library functions.
It s
I also took a look at the next procedure, split-list-by-separator.
My revised version is below. Unless I hear otherwise, I'll send a
patch soon.
- Mark
;; current version
(define-public (split-list-by-separator lst sep?)
"(display (split-list-by-separator '(a b c / d e f / g) (lambda (x) (equ
Jay Anderson wrote:
> Actually, I like this much better. A couple things:
> - It doesn't handle an empty list as input. Or is an error the correct
> behavior?
> - I'm not the biggest fan of multiple return values. You could do
> (cons (take lst (1+ i)) (drop lst (1+ i))) instead (unless there ar
On Mon, Jun 22, 2009 at 6:03 PM, Mark Polesky wrote:
> I know, I know, I just won't let this die. I rewrote this silly
> function yet again (by now it's more of a programming exercise
> than anything else). But the things I've learned from everyone so
> far have found their way into my other LilyPo
Jay Anderson wrote:
> > last-pair is an O(n) operation, since it has to traverse the whole list,
> > making split-at-predicate O(n^2) instead of O(n), as it should be. You'd be
> > better off building L0 backwards and reversing it at the end, so that the
> > element you need is always at the begi
On Mon, Jun 15, 2009 at 3:03 AM, Joe Neeman wrote:
>
> On Mon, Jun 8, 2009 at 3:59 AM, Mark Polesky wrote:
>>
>> my version:
>>
>> (define-public (split-at-predicate predicate lst)
>> "Split LST (into 2 lists) at the first element that returns #f for
>> (PREDICATE previous_element element), and
On Mon, Jun 8, 2009 at 3:59 AM, Mark Polesky wrote:
> my version:
>
> (define-public (split-at-predicate predicate lst)
> "Split LST (into 2 lists) at the first element that returns #f for
> (PREDICATE previous_element element), and return the 2 new lists as a
> pair. Example: (split-at-pre
Anyone want to double-check (and apply) my rewrite of
split-at-predicate?
http://lists.gnu.org/archive/html/lilypond-devel/2009-06/msg00226.html
Thanks
- Mark
___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailm
Neil Puttock wrote:
> -(define (split-at-predicate predicate lst)
> +(define-public (split-at-predicate predicate lst)
>
> Can you amend the docstring for this, since the example given is
> a bit broken (the cons part shouldn't be there):
>
> (split-at-predicate (lambda (x y) (= (- y x) 2)) '(1 3 5
2009/6/4 Patrick McCarty :
> The "print-book-with" procedure is pretty specialized, but I don't see
> any harm in making it public.
It's a helper function for print-book-with-defaults and
print-book-with-defaults-as-systems, so there's no need to make it
public.
-(define (split-at-predicate pred
On Sat, May 30, 2009 at 1:08 AM, Mark Polesky wrote:
> Patrick McCarty wrote:
>> I don't know if there is any performance penalty, but it's probably
>> negligible. You could propose that these procedures be made public; I
>> am okay with it.
>
> Then if no one has any reservations, does anyone wa
Patrick McCarty wrote:
> I don't know if there is any performance penalty, but it's probably
> negligible. You could propose that these procedures be made public; I
> am okay with it.
Then if no one has any reservations, does anyone want to apply this?
- Mark
0005-lily-library.scm-Mak
21 matches
Mail list logo