Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Write hello world

Name: Anonymous 2012-02-13 18:30

as complicated as possible and in a functional language of your choosing

Name: Anonymous 2012-02-16 0:20

#include <stdio.h>
#define S(T) typedef struct T { int x; } T
#define say(T) _Generic((T), \
    struct H: 'H', \
    struct e: 'e', \
    struct l: 'l', \
    struct o: 'o', \
    struct W: 'w', \
    struct r: 'r', \
    struct d: 'd', \
    struct co: ',', \
    struct sp: ' ', \
    struct ex: '!', \
    struct nl: '\n')

int main(void) {
    S(H);S(W);S(co);S(d);S(e);S(ex);S(l);S(nl);S(o);S(r);S(sp);
    putchar(say((H){}));
    putchar(say((e){}));
    putchar(say((l){}));
    putchar(say((l){}));
    putchar(say((o){}));
    putchar(say((co){}));
    putchar(say((sp){}));
    putchar(say((W){}));
    putchar(say((o){}));
    putchar(say((r){}));
    putchar(say((l){}));
    putchar(say((d){}));
    putchar(say((ex){}));
    putchar(say((nl){}));
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List