Add caseof syntax to lib