William James
4/9/2016 12:40:00 PM
WJ wrote:
> Slobodan Blazeski wrote:
>
> > See below to get some idea , it's very ugly and quick-n-dirty but it
> > looks like that it works, sorry no time to clear it & test it more
> > thoroughly.
> >
> > (defun be4 (a b)
> > (cond ((< (position (car a) numbers)
> > (position (car b) numbers))
> > t)
> > ((> (position (car a) numbers)
> > (position (car b) numbers))
> > nil)
> > (t
> > (if (< (position (cdr a) letters)
> > (position (cdr b) letters))
> > t))))
> >
> > (defun number-and-letter (values)
> > (sort values #'be4))
> >
> > (number-and-letter '((3 . F) (3 . A) (4 . C) (4 . B) (2 . A) (6 . C)
> > (7 . E)))
> > =>((2 . A) (3 . A) (3 . F) (4 . B) (4 . C) (6 . C) (7 . E))
>
> MatzLisp (Ruby):
>
> [[3,"F"],[3,"A"],[4,"C"],[4,"B"],[2,"A"],[6,"C"],[7,"E"]].sort
> ===>
> [[2, "A"], [3, "A"], [3, "F"], [4, "B"], [4, "C"], [6, "C"], [7, "E"]]
OCaml:
List.sort compare [3,"F";3,"A";4,"C";4,"B";2,"A";6,"C";7,"E"];;
===>
[(2, "A"); (3, "A"); (3, "F"); (4, "B"); (4, "C"); (6, "C"); (7, "E")]
--
The former leader of the National Front Jean-Marie Le Pen was fined 30,000
euros for exposing the Jews Holocaust gas chamber hoax.
infostormer.com/jean-marie-le-pen-fined-30000-euros-for-exposing-jewish-holocaust-gas-chamber-hoax