+typedef struct _item_in_category_closure
+{
+ mnemon_t *mnemon;
+ category_t *category;
+} item_in_category_closure_t;
+
+static int
+mnemon_item_in_category (void *closure, item_t *item)
+{
+ item_in_category_closure_t *iicc = closure;
+ mnemon_t *mnemon = iicc->mnemon;
+ category_t *category = iicc->category;
+
+ return (mnemon_item_category (mnemon, item) == category);
+}
+
+typedef struct _item_in_category_of_length_closure
+{
+ mnemon_t *mnemon;
+ category_t *category;
+ int length;
+} item_in_category_of_length_closure_t;
+
+static int
+mnemon_item_in_category_of_length (void *closure, item_t *item)
+{
+ item_in_category_of_length_closure_t *iicolc = closure;
+ mnemon_t *mnemon = iicolc->mnemon;
+ category_t *category = iicolc->category;
+ int length = iicolc->length;
+
+ if (mnemon_item_category (mnemon, item) != category)
+ return 0;
+
+ return strlen (item->challenge) == length;
+}
+