def permuteFloats(lst): startList = \ pipe(lst, [ F(List.map)( Basics.toFloat ) ]) newElements = \ pipe(startList, [ List.sort, F(List.map)( lambda n: (n + 0.5) ), lambda items: List.cons(0.5, items) ]) return pipe(newElements, [ F(List.map)(List.singleton), F(List.map)(lambda x: List.append(startList, x)) ])
def map5(lst): return \ pipe(lst, [ F(List.map5)( lambda a, b, c, d, e: F(Tuple.pair)( a, F(Tuple.pair)( b, F(Tuple.pair)( c, F(Tuple.pair)( d, e ) ) ) ) , List.toElm([ 10, 20, 30 ]), List.toElm([ 5, 8, 7 ]), List.toElm([ 1, 2, 3, 4, 5 ]), List.toElm([ 33, 97, 103 ]) ) ])
def a1a1f2(n): return \ F(F(lambda x, y: ((x * 10) + y) )( 1 ))( n )
def concatMap(lst): return \ F(List.concatMap)( F(List.map)( lambda n: (n * 5) ), lst )
def partition(lst): return \ F(List.partition)( lambda n: (F(Basics.modBy)( 2, n ) == 0) , lst )
def a1a1a1f3(n): return \ F(F(F(lambda x, y, z: ((x * 100) + ((y * 10) + z)) )( 1 ))( 2 ))( n )
def factorial2(n): return \ pipe(F(List.range)( 1, n ), [ F(List.foldl)( lambda a, b: a * b, 1 ) ])
def unzip(lst): return \ pipe(lst, [ F(List.map)( lambda x: F(Tuple.pair)( x, (x * 3) ) ), List.unzip ])
def incr(n): return \ F(lambda x: (x + 1) )( n )
def any(lst): return \ F(List.any)( lambda x: (4 == x) , lst )
def pythagTest(n): return \ F(lambda x, y: ((x * x) + (y * y)) )( 9, n )
def all(lst): return \ F(List.all)( lambda x: (1 == x) , lst )
def ranks(lst): return \ pipe(lst, [ F(List.indexedMap)( Tuple.pair ), F(List.sortBy)( Tuple.second ), F(List.map)( Tuple.first ), F(List.indexedMap)( Tuple.pair ), F(List.sortBy)( Tuple.second ), F(List.map)( Tuple.first ), F(List.map)( lambda n: (n + 1) ) ])
def foldr(lst): return \ pipe(lst, [ F(List.foldr)( List.cons, List.toElm([ ]) ) ])
def map2(lst): return \ pipe(lst, [ F(List.map2)( List.range, List.toElm([ 1, 2, 3 ]) ) ])
def filter(lst): return \ pipe(lst, [ F(List.filter)( lambda x: (x == 4) ) ])
def f4Test(n): return \ F(lambda a, b, c, d: ((a + b) * (c + d)) )( 1, 2, 3, n )
def map2Pythag(lst): return \ pipe(lst, [ F(List.map2)( lambda x, y: ((x * x) + (y * y)) , List.toElm([ 3, 5, 7 ]) ) ])
def map3(lst): return \ pipe(lst, [ F(List.map3)( lambda x, y, z: ((x * 100) + ((y * 10) + z)) , List.toElm([ 10, 20, 30 ]), List.toElm([ 5, 8, 7 ]) ) ])
def sortWith(lst): return \ F(List.sortWith)( lambda a, b: F(Basics.compare)( F(lambda n: F(Basics.modBy)( 10, n ) )( a ), F(lambda n: F(Basics.modBy)( 10, n ) )( b ) ) , lst )
def map4(lst): return \ pipe(lst, [ F(List.map4)( lambda a, b, c, d: ((a + b) * (c + d)) , List.toElm([ 10, 20, 30 ]), List.toElm([ 5, 8, 7 ]), List.toElm([ 1, 2 ]) ) ])
def f5Test(n): return \ F(lambda a, b, c, d, e: F(Tuple.pair)( a, F(Tuple.pair)( b, F(Tuple.pair)( c, F(Tuple.pair)( d, e ) ) ) ) )( 1, 2, 3, 4, n )
def tail(lst): return \ F(List.tail)( lst )
def sum(lst): return \ F(List.sum)( lst )
def reverse(lst): return \ F(List.reverse)( lst )
def repeat(n): return \ F(List.repeat)( n, 42 )
def member(lst): return \ F(List.member)( 42, lst )
def take(lst): return \ F(List.take)( 2, lst )
def minimum(lst): return \ F(List.minimum)( lst )
def product(lst): return \ F(List.product)( lst )