5 Rollback to Revision 1
source | link

Haskell, 162 146162 bytes

import Data.List
(a:b)%(xc:yd)=show x++ac++a:b%yb%d
_%[l]=show_%[x]=show lx
f l=l=map(l%)$l#[0.filter(l#)$permutations[0..length l]
(ae:bf)#(x:y)|a=='<'=x:b#y|0<1=reverse.take((length.takeWhilez)=(==ae!x)$ay&&f#(y:bz)+1
_#_=0<1
'>'!x=(>)$x:yx
_#x=x_!x=(<)x

This is still friggin' long.

Haskell, 162 146 bytes

(a:b)%(x:y)=show x++a:b%y
_%[l]=show l
f l=(l%)$l#[0..length l]
(a:b)#(x:y)|a=='<'=x:b#y|0<1=reverse.take((length.takeWhile(==a)$a:b)+1)$x:y
_#x=x

This is still friggin' long.

Haskell, 162 bytes

import Data.List
(a:b)%(c:d)=show c++a:b%d
_%[x]=show x
f l=map(l%).filter(l#)$permutations[0..length l]
(e:f)#(x:y:z)=(e!x)y&&f#(y:z)
_#_=0<1
'>'!x=(>)x
_!x=(<)x

This is friggin' long.

4 golf
source | link

Haskell, 162162 146 bytes

import Data.List
(a:b)%(cx:dy)=show c++ax++a:b%db%y
_%[x]=show_%[l]=show xl
f l=mapl=(l%).filter(l#)$permutations[0$l#[0..length l]
(ea:fb)#(x:y:z)=|a=='<'=x:b#y|0<1=reverse.take(e!x)y&&f#(ylength.takeWhile(==a)$a:zb)
_#_=0<1
'>'!x=(>+1)x$x:y
_!x=(<)x_#x=x

This is still friggin' long.

Haskell, 162 bytes

import Data.List
(a:b)%(c:d)=show c++a:b%d
_%[x]=show x
f l=map(l%).filter(l#)$permutations[0..length l]
(e:f)#(x:y:z)=(e!x)y&&f#(y:z)
_#_=0<1
'>'!x=(>)x
_!x=(<)x

This is friggin' long.

Haskell, 162 146 bytes

(a:b)%(x:y)=show x++a:b%y
_%[l]=show l
f l=(l%)$l#[0..length l]
(a:b)#(x:y)|a=='<'=x:b#y|0<1=reverse.take((length.takeWhile(==a)$a:b)+1)$x:y
_#x=x

This is still friggin' long.

3 Rollback to Revision 1
source | link

Haskell, 162 91162 bytes

fimport l=mapData.List
(a:b)%(c:d)=show purec++a:b%d
_%[x]=show l#mapx
f show[0l=map(l%).filter(l#)$permutations[0..length l]
(ae:bf)#(x:y:z)|a=="<"=x++a++=(b#ye!x)|0<1=y&&f#(b#yy:z)++a++x
_#[x]=x_#_=0<1
'>'!x=(>)x
_!x=(<)x

This is friggin' long. Thanks @Martin for his great algorithm This is friggin' long.

Haskell, 162 91 bytes

f l=map pure l#map show[0..length l]
(a:b)#(x:y)|a=="<"=x++a++(b#y)|0<1=(b#y)++a++x
_#[x]=x

This is friggin' long. Thanks @Martin for his great algorithm.

Haskell, 162 bytes

import Data.List
(a:b)%(c:d)=show c++a:b%d
_%[x]=show x
f l=map(l%).filter(l#)$permutations[0..length l]
(e:f)#(x:y:z)=(e!x)y&&f#(y:z)
_#_=0<1
'>'!x=(>)x
_!x=(<)x

This is friggin' long.

2 golf
source | link
1
source | link