Implemented lamba-function style for API definition

Signed-off-by: naazgull <pedro.figueiredo@gmail.com>