guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

screwy alist syntax


From: Brian S McQueen
Subject: screwy alist syntax
Date: Thu, 15 Apr 2004 16:11:35 -0700 (PDT)

I just noticed something that looks screwy.  Is there a good reason for
the following?

The assq func take a key and an alist:

assq key alist
assv key alist
assoc key alist
scm_assq (key, alist)
scm_assv (key, alist)
scm_assoc (key, alist)

BUT the assq-ref func take an alist and a key, which is the opposite
order:

assq-ref alist key
assv-ref alist key
assoc-ref alist key
scm_assq_ref (alist, key)
scm_assv_ref (alist, key)
scm_assoc_ref (alist, key)

I think these should two classes of functions should have their args in
the same order.

Brian McQueen
NAS Division
NASA/Ames




reply via email to

[Prev in Thread] Current Thread [Next in Thread]