Elegant Function Replication Using Next-Generation Javascript