+LY_DEFINE(ly_assoc_get, "ly:assoc-get",
+ 2, 1, 0,
+ (SCM key, SCM alist, SCM default_value),
+ "Return value if KEY in ALIST, else DEFAULT-VALUE (or #f if not specified).")
+{
+ SCM handle = scm_assoc (key, alist);
+
+ if (default_value == SCM_UNDEFINED)
+ default_value = SCM_BOOL_F;
+
+ if (scm_is_pair (handle))
+ return scm_cdr (handle);
+ else
+ return default_value;
+}
+