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

Elegant solutions

Name: Anonymous 2007-06-28 15:16 ID:lcs47ZU6

Im bored, show me some good code (any language whatsoever)
Post a problem, then a great solution.

1) Transpose a matrix
(apply #'mapcar #'list '(( 1  2  3  4)
                         ( 5  6  7  8)
                         ( 9 10 11 12)
                         (13 14 15 16)))
(( 1  5  9 13)
 ( 2  6 10 14)
 ( 3  7 11 15)
 ( 4  8 12 16))

Name: Anonymous 2007-06-28 23:18 ID:9cNOan1x

>>23
are you a troll, or just a dumbass? you were supposed to CODE the "set" function! the set function, in fact, it's all you were supposed to code.

there are many ways of writing "uniq", depending if you want efficience or not, or if you want to preserve the order, or not.

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