A AMD implementation inspired by Seajs