Bencode, functional style casts