RosettaCodeData/Task/Order-two-numerical-lists/Bracmat/order-two-numerical-lists.bracmat
Ingy döt Net b83f433714 tasks a-s
2013-04-10 23:57:08 -07:00

24 lines
501 B
Text

( 1 2 3 4 5:?List1
& 1 2 1 5 2 2:?List2
& 1 2 1 5 2:?List3
& 1 2 1 5 2:?List4
& Cat Elephant Rat Cat:?List5
& Cat Elephant Rat:?List6
& Cat Cat Elephant:?List7
& ( gt
= first second
. !arg:(?first,?second)
& out
$ ( (.!first)+(.!second)
: ((.!first)+(.!second)|2*(.!first))
& FALSE
| TRUE
)
)
& gt$(!List1,!List2)
& gt$(!List2,!List3)
& gt$(!List3,!List4)
& gt$(!List4,!List5)
& gt$(!List5,!List6)
& gt$(!List6,!List7)
);