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

LISP [part λ f x. f (f x)]

Name: Anonymous 2008-01-31 8:38

LISP

Name: Anonymous 2008-02-20 12:23

>>766
lexPerms [] = [[]]
lexPerms l = concatMap (\(x,y) -> map (x:) $ lexPerms y) $ cp [] l where
    cp p (x:xs) = (x,p++xs) : cp (p++[x]) xs
    cp p _ = []


Newer Posts