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

Challenge

Name: Anonymous 2009-06-15 14:23

Write a C program which outputs binary values of all possible bytes(0-255) as e.g. '00001011\n' in the least space.

Name: Anonymous 2009-06-19 19:40

>>40
(ノ`ー´)ノ Here, have a hug
Don't worry, I didn't know that either until >>16-san pointed it out (thank you!!).

You can think of it as:
replicate 4 "abc" => [w:x:y:z:[] | w = "abc", x = "abc", y = "abc", z = "abc"]
replicateM 4 "abc" => [w:x:y:z:[] | w <- "abc", x <- "abc", y <- "abc", z <- "abc"]
It's obvious this way.

Name: Anonymous 2009-06-19 21:05

Thank you, >>41さん, you have prompted me to explore the mysterious wonders of monads. Through my adventures I have realized that lists are monads and that, for lists, (>>=) = concatMap, which clarifies things a lot.

Name: Anonymous 2009-06-19 21:07

>>42 =~ s/concatMap/flip concatMap/;

Name: Anonymous 2009-06-19 21:16

Here's another interesting one, but it's somewhat unrelated to this thread:
filterM (const [True,False]) [0..5]

Name: Anonymous 2009-06-19 21:44

Monads -> Magic.
True story.

Name: Anonymous 2009-06-20 4:37

hay im tryin 2 use monads but im not sure how in c++. halp plz


#include <monad>

int main()
{
  monad m = new monad();
}

Name: Anonymous 2009-06-20 4:56

>>46
try instead:

#include "monad.h"

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