A token bucket implementation in Erglan