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

J is an interesting language

Name: Anonymous 2007-01-13 19:23

quicksort=: (($:@(<#[) , (=#[) , $:@(>#[)) ({~ ?@#)) ^: (1<#)

Name: Anonymous 2007-01-15 8:58

Powerful, beautiful and elegant:

qsort = lambda l: l and qsort([x for x in l[1:] if x < l[0]]) + [l[0]] + qsort([x for x in l[1:] if x >= l[0]]) or []

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