I might suggest using `lists:split/2` and match on `{Name, "_bin"}` and `{Name, "_int"}` instead, to save a call to `length/1` and `lists:sublist/2`. Alternatively, the `re` module might be useful.