-
-
Save XCaminhante/7efa70937277cd42de55140d6c5f5dc4 to your computer and use it in GitHub Desktop.
Lambda em C
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int main () { | |
void (*f)() = // um ponteiro de função | |
({void _ () {puts("oi");}; &_;}); // uma lambda | |
f(); // uma chamada de lambda | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment