12:54:41wxieNo, it is not so straight forward though to do it right.
12:55:23phoeYou have both a very good explanation of the problem and the algorithms AND solutions in multiple other languages. Translating this to CL is nothing that I'd call complicated.
12:56:35nirvedlooks too simple to bother, almost same number of lines as the pseudo-code here https://en.wikipedia.org/wiki/Stable_marriage_problem#Algorithm
12:57:02phoewxie: first you translate it from another programming language, and then fix up the code so it's a bit more idiomatic CL.
12:57:12phoeBut then again, "unlispy" code, what is it?
12:58:02phoeI've seen CL being used to write object-oriented code, functional code, imperative code, linear code, declarative code, asynchronous code and a few of other lesser known paradigms. Hard to say that any of these were "unlispy".
12:59:11phoeThe part of what I'd call "lispiness" is that a person X comes up and say "hey, I just invented this new programming paradigm!" and Common Lisp is all like "come at me bro"
12:59:43Xachhowever, if you put close parens on their own line
13:00:06phoe...well, indentation is an exception, right.
13:00:30phoeBut nothing that can't be fixed by a few backspaces in emacs, anyway.
13:00:55wxiefor example, I come up with (push (cons (car pair) (cadr pair)) where pair is ((w1 . m1) (w2 . m2)). I am thinking if there is other ways to do it.
13:02:11phoeso basically, you have a two-element list, and you want to make a cons from that list, and push that cons to some kind of place called pairs.