(defn add-phone
"Add a phone number to a given service. There are a few steps we have to take:
- Validate the service name and token
...
Lisp On Clojure noob code
by Zehua,
October 17, 2011 09:28
(define (build-list L)
(define (remove-subnodes e xs)
(or (member e xs) '()))
...
Lisp On Super Simple Parser in Scheme
by podhmo,
January 06, 2011 03:31
this is gauche(one of schem...
(define (compose . fns) (define (make-chain fn chain) ...
Lisp On Generalised composition
by Chris Jester-Young,
October 17, 2010 16:29
Just for fun, I decided to ...
(define (compose . fns) (define (make-chain fn chain) ...
Lisp On Generalised composition
by Chris Jester-Young,
April 22, 2009 05:07
zbigniew from freenode #sch...
(defun next-lex (number-list &optional (rev-tail-list ())) "Returns the next lexicographic permutation of number-list." (cond ((null rev-tail-list) ; initial call ...
Lisp On Lexicographically next perm...
by Harleqin,
February 03, 2009 08:25
Here comes the fixed versio...
Lisp On Lexicographically next perm...
by Harleqin,
February 03, 2009 06:56
Sorry, that one has a bug t...
(defun next-lex (number-list &optional (rev-tail-list ())) "Returns the next lexicographic permutation of number-list." (cond ((null rev-tail-list) ; initial call ...
Lisp On Lexicographically next perm...
by Harleqin,
February 03, 2009 06:47
I think that this is somewh...
;;; LIS is a list of (possibly repeated) elements ;;; COMPARE is a boolean function of two elements, such as > (which is the default) ;;; This returns the next lexicographically larger (via COMPARE) list of those same elements ...
Lisp On Lexicographically next perm...
by M Tyson,
June 29, 2008 09:49
The initial example code ha...
(defun group-by (lst n) (cond ((null lst) nil) (t (cons (first-n n lst) ...
(defun transpose (m) (apply #'mapcar #'list m))
(defun Transpose (m) (Cond ((CAR m) (Cons (MapCAR 'CAR m) (Transpose (MapCAR 'CDR m))))))
Lisp On Lexicographically next perm...
by Sunnan,
October 15, 2007 11:51
p.s. your Bind macro is ava...
(require-extension miscmacros srfi-1) (define (next-lex nums) ...
Lisp On Lexicographically next perm...
by Sunnan,
October 15, 2007 11:32
Tried changing the algo to ...
Lisp On Lexicographically next perm...
by Kartik Agaram,
October 09, 2007 01:43
Nice!
1. How is the 'on' l...
(defun next-lex (a)
(with var r = (reverse a)
var pivor = (first-down r)
...
Lisp On Lexicographically next perm...
by niv,
October 09, 2007 00:45
rewritten with the "with" m...
(defun partition-upto (pivot a)
(loop for e in a
for r on a
...
Lisp On Lexicographically next perm...
by niv,
October 09, 2007 00:41
sorry, it's actually for r ...
(defun first-down (a)
(loop for fst in a
for scd in (cdr a)
...
Lisp On Lexicographically next perm...
by niv,
October 09, 2007 00:39
if you like (loop), also no...
(defun partition-upto (pivot a)
(values (remove-if (lambda (x) (> x pivot)))
(remove-if (lambda (x) (< x pivot)))))
Lisp On Lexicographically next perm...
by niv,
October 09, 2007 00:29
if you don't care about eff...
(defun partition-upto (pivot a &optional less more)
(cond
((eql (car a) pivot)
...

just updated the def's to l...