Two in context learning tasks with complex functions