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

/prog/ Challenge #9002

Name: Anonymous 2011-05-02 20:12

The task:

Print strings from "a" to "zzzzz" without using any loop or conditional statements. Don't just write all 1000 permutations out by hand. The output should look like this:
a
b
c
...
aa
ab
ac
...
zzzzx
zzzzy
zzzzz


inb4 lipthfags and dead dogs using some obscure functionality of their obscure languages.

Name: Anonymous 2011-05-04 20:44


' ' :: ['a'..'z'] |> List.iter (fun c1 ->
    ' ' :: ['a'..'z'] |> List.iter (fun c2 ->
        ' ' :: ['a'..'z'] |> List.iter (fun c3 ->
            ' ' :: ['a'..'z'] |> List.iter (fun c4 ->
                ['a'..'z'] |> List.iter (fun c5 -> System.Console.WriteLine((string(c1) + string(c2) + string(c3) + string(c4) + string(c5)).Trim()))))))

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