[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: env-fold for Guile?
From: |
Han-Wen Nienhuys |
Subject: |
Re: env-fold for Guile? |
Date: |
Thu, 11 Feb 2010 12:06:14 -0200 |
On Thu, Feb 11, 2010 at 2:35 AM, Carl Sorensen <address@hidden> wrote:
> I'm trying to look through all the bindings in a top-level environment and
> pull out any that include "-tuning" in their name.
>
> It appears to me that the bindings are stored in a hash table, and I ought
> to be able to do a fold procedure on a hash-table to check out all the
> bindings. But I can't find any way to access the hash table, or any
> procedure that will fold the environment hash table for me.
>
> Is this possible to do in guile?
Yes. Check out lily/ly-module.cc for some examples, (current-module)
will give you the current module. There are GUILE level routines for
most of this too, but you'd need to dig a bit in the GUILE sources.
--
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen